Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Custom HttpClient

Youssof Khawaja edited this page Sep 9, 2021 · 6 revisions

When constructing an interface from an interface factory, you can provide an instance to your own HttpClient. This allows you to maintain the lifetime of your HttpClient instances, use a single HttpClient across multiple interfaces, and provide customization unique to your scenarios.

If you don't provide your own HttpClient, the library will create a new one on each request.

HttpClient client = new HttpClient();
var steamUserInterface = webInterfaceFactory.CreateSteamWebInterface<SteamUser>(client);
var playerServiceInterface = webInterfaceFactory.CreateSteamWebInterface<PlayerService>(client);
var csGoServerInterface = webInterfaceFactory.CreateSteamWebInterface<CSGOServers>(client);

Clone this wiki locally

Morty Proxy This is a proxified and sanitized view of the page, visit original site.