Capture the HTTP request header?

  • Thread starter Thread starter mrbog
  • Start date Start date
M

mrbog

Hello, I'm making HTTP requests with System.Net.HTTPWebRequest and I
want to capture the entire header of the request as a string. I'm able
to do this with responses but now the requests. Am I missing it in the
API somewhere or is there another way?

thank you
 
mrbog,

The HttpWebRequest has a headers property that has all of the headers.
This collection, combined with the properties on the HttpWebRequest
(UserAgent, for example), will give you all of the headers that are sent.

Hope this helps.
 
Back
Top