Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
services.AddHttpClient("example", c =>
{
c.BaseAddress = new Uri("https://api.example.com/");
c.DefaultRequestHeaders.Add("Accept", "application/json");
c.DefaultRequestHeaders.Add("User-Agent", "HttpClientFactory-Sample");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment