Skip to content

Instantly share code, notes, and snippets.

@emrekizildas
Created December 7, 2019 10:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save emrekizildas/3d23cd420a7337f749ace8317665aa5c to your computer and use it in GitHub Desktop.
Save emrekizildas/3d23cd420a7337f749ace8317665aa5c to your computer and use it in GitHub Desktop.
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