hickory_proto::http::request

Function new

Source
pub fn new(
    version: Version,
    name_server_name: &str,
    query_path: &str,
    message_len: usize,
) -> Result<Request<()>>
Available on crate features dns-over-https-rustls or dns-over-h3 only.
Expand description

Create a new Request for an http dns-message request

https://tools.ietf.org/html/draft-ietf-doh-dns-over-https-10#section-5.1
The URI Template defined in this document is processed without any
variables when the HTTP method is POST.  When the HTTP method is GET
the single variable "dns" is defined as the content of the DNS
request (as described in Section 7), encoded with base64url
[RFC4648].