-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #587 from DFE-Digital/feature/create-complete-proj…
…ects Feature/create complete projects
- Loading branch information
Showing
74 changed files
with
17,681 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
Dfe.Academies.Academisation.Data/Http/CompleteApiClientFactory.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using Dfe.Academisation.CorrelationIdMiddleware; | ||
|
||
namespace Dfe.Academies.Academisation.Data.Http | ||
{ | ||
public class CompleteApiClientFactory : ICompleteApiClientFactory | ||
{ | ||
private readonly IHttpClientFactory _httpClientFactory; | ||
|
||
public CompleteApiClientFactory(IHttpClientFactory httpClientFactory) | ||
{ | ||
_httpClientFactory = httpClientFactory; | ||
} | ||
|
||
public HttpClient Create(ICorrelationContext correlationContext) | ||
{ | ||
var httpClient = _httpClientFactory.CreateClient("CompleteApi"); | ||
httpClient.DefaultRequestHeaders.Add(Keys.HeaderKey, correlationContext.CorrelationId.ToString()); | ||
return httpClient; | ||
} | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
Dfe.Academies.Academisation.Data/Http/ICompleteApiClientFactory.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
using Dfe.Academisation.CorrelationIdMiddleware; | ||
|
||
namespace Dfe.Academies.Academisation.Data.Http | ||
{ | ||
public interface ICompleteApiClientFactory | ||
{ | ||
HttpClient Create(ICorrelationContext correlationContext); | ||
} | ||
} |
Oops, something went wrong.