Skip to content

Conversation

@gaetschwartz
Copy link
Contributor

@gaetschwartz gaetschwartz commented Mar 9, 2023

Add support for custom headers in the http Client.

Tangential

Additionnally, according to RFC 2822, Section 2.2 (and common conception) the first line of an HTTP request is not a header. It is called a "status line" by RFC 2616 Section 6.1.

HTTP/1.0 200 OK

It thus feels somewhat weird to me that we consider the status and the http version as headers, accessing them as if the http response somewhat looked like that.

Status: 200
Version: HTTP/1.0

Let me know if it's something we want to address in which case I can edit my PR to make that change as well. To me both status and version should be fields of the response rather than response's header field.

@gaetschwartz
Copy link
Contributor Author

Preferably we would wait for #14762 to be merged so I can update this PR.

@gaetschwartz gaetschwartz force-pushed the http-client-custom-headers branch from 816aceb to b445bbf Compare March 10, 2023 09:01
@rofrol
Copy link
Contributor

rofrol commented Mar 10, 2023

#14762 is merged

@gaetschwartz
Copy link
Contributor Author

Rewritten in #14871 @rofrol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants