protected async override Task <HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) { var authHeader = new AuthorizationHeader(_hashKeys.APPId); authHeader.Signature = await _signer.SignAsync(request, authHeader, _hashKeys); request.Headers.Authorization = new AuthenticationHeaderValue(_authHeaderSerializer.AuthenticationScheme, _authHeaderSerializer.Serialize(authHeader)); var response = await base.SendAsync(request, cancellationToken); return(response); }
protected override async Task <HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) { await _signer.SignAsync(request).ConfigureAwait(false); return(await base.SendAsync(request, cancellationToken).ConfigureAwait(false)); }