title: How to configure multiple HttpClient instances with different configurations in Blazor WebAssembly
body: <p>I'm trying to configure multiple API urls in the Program.cs class in Blazor WASM. I'm not seeing an AddHttpClient extension like in server-side. Was wondering if anyone had an alternate solution for this?</p>
  
  <p>Here's what I have so far:</p>
  
  <pre><code>var firstURI = new Uri("https://localhost:44340/");
  var secondURI = new Uri("https://localhost:5001/");
  
  void RegisterTypedClient&lt;TClient, TImplementation&gt;(Uri apiBaseUrl)
     where TClient : class where TImplementation : class, TClient
  {
     builder.Services.AddHttpClient&lt;TClient, TImplementation&gt;(client =&gt;
     {
         client.BaseAddress = apiBaseUrl;
     });
  }
  
  // HTTP services
  RegisterTypedClient&lt;IFirstService, FirstService&gt;(firstURI);
  RegisterTypedClient&lt;ISecondService, SecondService&gt;(secondURI);
  </code></pre>