feat(BaseHttpClientService): Header hinzugefügt
This commit is contained in:
parent
70ccec9fef
commit
85e5fc4018
@ -13,6 +13,7 @@ namespace DigitalData.Core.Abstractions.Client
|
||||
HttpMethod? method = null,
|
||||
HttpContent? body = null,
|
||||
Dictionary<string, string>? form = null,
|
||||
Dictionary<string, string>? headers = null,
|
||||
bool sendWithCookie = true,
|
||||
bool saveCookie = true
|
||||
);
|
||||
|
||||
@ -27,6 +27,7 @@ namespace DigitalData.Core.Client
|
||||
HttpMethod? method = null,
|
||||
HttpContent? body = null,
|
||||
Dictionary<string, string>? form = null,
|
||||
Dictionary<string, string>? headers = null,
|
||||
bool sendWithCookie = true,
|
||||
bool saveCookie = true
|
||||
)
|
||||
@ -40,6 +41,9 @@ namespace DigitalData.Core.Client
|
||||
|
||||
var requestMessage = new HttpRequestMessage(method, requestUriStr);
|
||||
|
||||
// Add headers if provided
|
||||
headers?.ForEach(header => requestMessage.Headers.Add(header.Key, header.Value));
|
||||
|
||||
// Add cookie to request
|
||||
if (sendWithCookie)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user