Skip to content

Tag: HttpClient

C#/.NET 0

[HOWTO] Set Cookie Header on DefaultRequestHeaders of HttpClient

For one of our customers we had to implement Cookie handling for authentication purposes. This means reading the session token out of the Set-Cookie header and send the session token in the Cookie header of every request. When using the HttpClient from System.Net.Http there are two possibilites to do that. Either by passing a HttpClientHandler with a CookieContainer to the […]