hashicorp / consul

Consul is a distributed, highly available, and data center aware solution to connect and configure applications across dynamic, distributed infrastructure.
https://www.consul.io
Other
28.37k stars 4.42k forks source link

Document HTTP API request and response headers #12544

Open jkirschner-hashicorp opened 2 years ago

jkirschner-hashicorp commented 2 years ago

Problem

It's difficult to understand how to use headers in the HTTP API because:

Proposal

Create a central reference document for all request and response headers. The organizational hierarchy of such a page needs to be thought through. Options include:

Ideally, this page would also include a section describing how to set request headers and inspect response headers (e.g., curl example).

Known headers to document

Header lists populated below were generated by (case-insensitive) searching through the source code for matches to:

Request headers

Response headers

blake commented 2 years ago

Is the goal here to document standard HTTP headers in addition to Consul-specific headers?

jkirschner-hashicorp commented 2 years ago

My opinion is that it would be to document:

The list above may include headers that we don't really need to document. I was focused on quickly capturing what I could find in our source code so someone could downselect later. I didn't want to prematurely downselect.