dotnet / dotnet/dotnet-api-docs
Thread safety of BaseAddress and DefaultRequestHeaders
- Dominant language
- C#
- Stars
- 949
- Forks
- 1.7k
- Avg merge
- 3d 27m
- Merged PRs (30d)
- 49
Description
It would be good to add a note that changing BaseAddress or DefaultRequestHeaders is *not* a thread-safe operation, and you should change them on concurrent requests.
See [here](http://www.michaeltaylorp3.net/httpclient-is-it-really-thread-safe/) and mspnp/architecture-center#935
---
#### Document Details
⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*
* ID: cbd5007c-82e5-a0c1-2156-7df4bbbcc2da
* Version Independent ID: eba98e03-3cc2-bebe-3dcd-45eda9c9c378
* Content: [HttpClient Class (System.Net.Http)](https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netframework-4.7.2)
* Content Source: [xml/System.Net.Http/HttpClient.xml](https://github.com/dotnet/dotnet-api-docs/blob/master/xml/System.Net.Http/HttpClient.xml)
* Product: **dotnet-api**
* GitHub Login: @karelz
* Microsoft Alias: **ncldev**
Contributor guide
Assessment
This issue has not been assessed yet.