Different HttpClient headers
When I make an HTTP request in my browser (Chrome), I get different response headers than I do in my program using
HttpClient
with a HttpClientHandler
I'm using all the exact same headers, including the same cookies, and making the request to the same URL - I also have redirects disabled
Why could this be?
Chrome shows me 11 headers, whereas C#'s HttpClient
only shows me 6 headers from the exact same request10 Replies
unhappily its really hard to guess without code
Are you spoofing the Chrome user agent as well?
should if he is sending the same headers as he said
Yes
you're adding the headers after u made the request
it needs to be done before
omfg
ok.......................
you add your headers to the HttpClientHandler
ty
lol
I'm so dumb
and that's why posting code = quick job
An hour of my life...................
ty lol