alexrainman / ModernHttpClient

ModernHttpClient
MIT License
126 stars 28 forks source link

How can I get cookie from server? #37

Closed babman92 closed 5 years ago

babman92 commented 5 years ago

Hi guys, I using HttpClient to request to a URL and server return some cookies.

I don't see anywhere mention that way, please help, thanks.

I'm using Xamarin.Forms v4.0 and create a bank project.

Reference: https://docs.postman-echo.com/?version=latest#3de3b135-b3cc-3a68-ba27-b6d373e03c8c

alexrainman commented 5 years ago

Set-Cookie is a header so, it should be part of the HttpResponseMessage.

Update: I ran some tests and Set-Cookie header is returned in the HttpResponseMessage, you just need to parse it.

babman92 commented 5 years ago

Set-Cookie is a header so, it should be part of the HttpResponseMessage.

Update: I ran some tests and Set-Cookie header is returned in the HttpResponseMessage, you just need to parse it.

Thanks you!