Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

Commit

Permalink
Merge pull request #816 from DFE-Digital/patch/http-user-agent
Browse files Browse the repository at this point in the history
Set HTTP user agent header
  • Loading branch information
paullocknimble authored Sep 27, 2024
2 parents 0a2d923 + 316bdbd commit 5ace7cf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Dfe.PrepareTransfers.Web/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -251,13 +251,15 @@ private static void AddServices(IServiceCollection services, IConfiguration conf
httpClient.BaseAddress = new Uri(tramsApiBase);
httpClient.DefaultRequestHeaders.Add("ApiKey", tramsApiKey);
httpClient.DefaultRequestHeaders.Add("ContentType", "application/json");
httpClient.DefaultRequestHeaders.Add("User-Agent", "PrepareTransfers/1.0");
});

services.AddHttpClient("AcademisationApiClient", httpClient =>
{
httpClient.BaseAddress = new Uri(academisationApiBase);
httpClient.DefaultRequestHeaders.Add("x-api-key", academisationApiKey);
httpClient.DefaultRequestHeaders.Add("ContentType", "application/json");
httpClient.DefaultRequestHeaders.Add("User-Agent", "PrepareTransfers/1.0");
});

services.AddScoped<IReferenceNumberService, ReferenceNumberService>();
Expand Down

0 comments on commit 5ace7cf

Please sign in to comment.