title: How to use AddHttpClient in .NET 6 Worker Service
body: <p>Is there an alternative way to add the &quot;AddHttpClient()&quot; setting in the .NET 6 Worker Service template?</p>
  <p>In Minimal APIs for example we have available:</p>
  <pre class="lang-cs prettyprint-override"><code>var builder = WebApplication.CreateBuilder(args);
  builder.Services.AddHttpClient();
  </code></pre>
  <p>In the Worker Service template is not:</p>
  <p><a href="https://i.stack.imgur.com/BkgBd.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BkgBd.jpg" alt="enter image description here" /></a></p>