Skip to content

Commit

Permalink
[1.1.1.1] Update ct URL parameter availability (#13471)
Browse files Browse the repository at this point in the history
* Quick style guide adjustments

* Add keyword to custom rule definition and placeholder h3

* Reframe last section to address use case and more specific example

* Text-refine example intro and replace HTML tables

* Remove references to ct URL parameter

* Replace UDP wireformat by DNS wireformat for consistency
  • Loading branch information
RebeccaTamachiro authored Mar 15, 2024
1 parent be90b3d commit 422492b
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ https://cloudflare-dns.com/dns-query

## HTTP method

Cloudflare's DNS-over-HTTPS (DOH) endpoint supports `POST` and `GET` for UDP wireformat, and `GET` for JSON format.
Cloudflare's DNS-over-HTTPS (DOH) endpoint supports `POST` and `GET` for DNS wireformat, and `GET` for JSON format.

When making requests using `POST`, the DNS query is included as the message body of the HTTP request, and the MIME type (`application/dns-message`) is sent in the `Content-Type` request header. Cloudflare will use the message body of the HTTP request as sent by the client, so the message body should not be encoded.

When making requests using `GET`, the DNS query is encoded into the URL. An additional URL parameter of `ct` should indicate the MIME type (see below).
When making requests using `GET`, the DNS query is encoded into the URL.

## Valid MIME types

If you use JSON format, set `application/dns-json` URL parameter, and if you use DNS wireformat, use `application/dns-message` as either the URL parameter of `ct` or a `Content-Type` header for `POST` requests.
If you use JSON format, set `application/dns-json`, and if you use DNS wireformat, use `application/dns-message`.

See also curl examples for [UDP wireformat](/1.1.1.1/encryption/dns-over-https/make-api-requests/dns-wireformat/) and [JSON](/1.1.1.1/encryption/dns-over-https/make-api-requests/dns-json/).
Refer to [DNS wireformat](/1.1.1.1/encryption/dns-over-https/make-api-requests/dns-wireformat/) and [JSON](/1.1.1.1/encryption/dns-over-https/make-api-requests/dns-json/) for cURL examples.

## Send multiple questions in a query

Expand Down

0 comments on commit 422492b

Please sign in to comment.