From eec946170cdff7477412b01041ca6a25f4b3d40a Mon Sep 17 00:00:00 2001 From: Evgeny Valavin <35497422+evgenyvalavin@users.noreply.github.com> Date: Thu, 8 Jun 2023 10:15:17 +0500 Subject: [PATCH] Bugfix. ApiEndpoint.AddRequestHeaders() never invoked (#35) --- src/Arbus.Network/Abstractions/ApiEndpoint.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Arbus.Network/Abstractions/ApiEndpoint.cs b/src/Arbus.Network/Abstractions/ApiEndpoint.cs index 9434cce..d92902c 100644 --- a/src/Arbus.Network/Abstractions/ApiEndpoint.cs +++ b/src/Arbus.Network/Abstractions/ApiEndpoint.cs @@ -17,14 +17,15 @@ public abstract class ApiEndpoint public CancellationToken? CancellationToken { get; set; } - protected internal virtual HttpRequestMessage CreateRequest(Uri? baseUrl) + protected internal virtual HttpRequestMessage CreateRequest(Uri? baseUri) { - var requestUri = CreateRequestUri(baseUrl); + var requestUri = CreateRequestUri(baseUri); var request = new HttpRequestMessage(Method, requestUri) { Content = CreateContent() }; + AddRequestHeaders(request.Headers); request.SetTimeout(Timeout); return request;