Got it, finally. You can get the raw header text with;
Response.Headers.ToString
And now I can see the raw headers I posted above. Still don't know why .NET wasn't putting those cookies in the container but now I can manually at least.
Here's the raw response from Charles. I've replaced the domain name with XXXXX and trimmed the content, nothing else.
HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
Status: 200
X-Powered-By: Phusion Passenger (mod_rails/mod_rack) 3.0.12
X-Runtime: 42...
Well, the request response i am checking with Charles (the one that shows the cookie) is the one being executed in my app. I have the app using the 127.0.0.1:8888 proxy so I can see it in Charles' Proxy.
I realise HTTP only cookies are not meant to be accessed by the client, which is why .NET...
Unfortunately, it didn't work. The code is good, the problem is that the cookie doesn't show in the response.cookies cookiecontainer or in a cookiecollection object i attach to the request. Driving me crazy.
I see the cookie in Charles Proxy, so I know it's part of the response. It doesn't...
Thank you both.
Roach I haven't run that code but I believe that is good for getting normal cookies but I don't think HTTP Only cookies can be accessed in that way. Please correct me if I am wrong.
I am going to test out theMagicNumber's code as it looks good, if you don't hear from me then...
I am making a web request and monitoring it in Charles' Proxy. I can see HTTP only cookies coming back in the response but I cannot access them via the cookiecontainer object. I can see other cookies in the container but not the HTTP only one I am after.
Does anyone know how to do this? I...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.