I'm writing a library that uses Reqwest and serializes the Request and Response structs to WARC files.
It works great for the Responses, but with Requests it only shows me the headers I've set myself, because I'm using the Request struct before it is passed into the library.
Thus, it doesn't show any library-set headers like User-Agent, I'd guess Accept when the user doesn't set it, and Content-Length (see #1030).
It would be great if we could get access to the Request object as it looks after any library modifications. For my situation, I'm fine getting the Request headers before or after sending request, but I can imagine some folks who would access to it before sending.
I'm not sure if Hyper also sets default headers, in which case this would be more complicated.
Let me know what you think!
I'm writing a library that uses Reqwest and serializes the
RequestandResponsestructs to WARC files.It works great for the
Responses, but withRequestsit only shows me the headers I've set myself, because I'm using theRequeststruct before it is passed into the library.Thus, it doesn't show any library-set headers like
User-Agent, I'd guessAcceptwhen the user doesn't set it, andContent-Length(see #1030).It would be great if we could get access to the
Requestobject as it looks after any library modifications. For my situation, I'm fine getting theRequestheaders before or after sending request, but I can imagine some folks who would access to it before sending.I'm not sure if Hyper also sets default headers, in which case this would be more complicated.
Let me know what you think!