/// <inheritdoc />
        public async Task <HttpResponseMessage> SendRequestAsync(HttpMethod method, string relativeUrl,
                                                                 Dictionary <string, List <string> > customHeaders = null, CancellationToken cancellationToken = default)
        {
            var userId = FulcrumApplication.Context.ValueProvider.GetValue <string>("DecoratedUserId");

            var translator = CreateTranslator();
            await translator.AddSubStrings(relativeUrl).Add(userId).ExecuteAsync(cancellationToken);

            SetupTranslatedUserId(translator, userId);

            return(await HttpSender.SendRequestAsync(method, translator.Translate(relativeUrl), customHeaders, cancellationToken));
        }
        /// <inheritdoc />
        public async Task <HttpOperationResponse <TResponse> > SendRequestAsync <TResponse, TBody>(HttpMethod method, string relativeUrl,
                                                                                                   TBody body = default, Dictionary <string, List <string> > customHeaders = null,
                                                                                                   CancellationToken cancellationToken = default)
        {
            var userId = FulcrumApplication.Context.ValueProvider.GetValue <string>("DecoratedUserId");

            var translator = CreateTranslator();
            await translator.AddSubStrings(relativeUrl).Add(body).Add(userId).ExecuteAsync(cancellationToken);

            SetupTranslatedUserId(translator, userId);

            var result = await HttpSender.SendRequestAsync <TResponse, TBody>(
                method,
                translator.Translate(relativeUrl),
                translator.Translate(body),
                customHeaders,
                cancellationToken);

            result.Body = (TResponse)translator.Decorate(result.Body, typeof(TResponse));
            return(result);
        }
 /// <inheritdoc />
 public string GetAbsoluteUrl(string relativeUrl)
 {
     return(HttpSender.GetAbsoluteUrl(relativeUrl));
 }
 /// <inheritdoc />
 public Task <HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken = default)
 {
     return(HttpSender.SendAsync(request, cancellationToken));
 }
 /// <inheritdoc />
 public IHttpSender CreateHttpSender(string relativeUrl)
 {
     InternalContract.RequireNotNull(relativeUrl, nameof(relativeUrl));
     return(new ValueTranslatorHttpSender(HttpSender.CreateHttpSender(relativeUrl), TranslationClientName));
 }