private async Task<RestResponse> SendInternalAsync(HttpRequestMessage request, CancellationToken cancelToken, bool headerOnly)
{
cancelToken = CancellationTokenSource.CreateLinkedTokenSource(_cancelToken, cancelToken).Token;
HttpResponseMessage response = await _client.SendAsync(request, cancelToken).ConfigureAwait(false);
var headers = response.Headers.ToDictionary(x => x.Key, x => x.Value.FirstOrDefault(), StringComparer.OrdinalIgnoreCase);
var stream = !headerOnly ? await response.Content.ReadAsStreamAsync().ConfigureAwait(false) : null;
return new RestResponse(response.StatusCode, headers, stream);
}
Code Example |
---|
Csharp :: random number between 1 and 100 c# |
Csharp :: Dominosteine c# |
Csharp :: c# switch statement |
Html :: stylesheet einbinden html5 |
Html :: html space |
Html :: font awesome icon for email |
Html :: disable spell check html |
Html :: bootstrap text bold |
Html :: ion-content background color |
Html :: bootstrap cdn link |
Html :: fa link |
Html :: twitter share link html |
Html :: how to change h1 color in html |
Html :: verbalna komunikacija |
Html :: taka html code |
Html :: a href mail |
Html :: jquery integration |
Html :: bootstrap center button horizontally |
Html :: vue datatable date format |
Html :: html power |
Html :: bootstrap 5 align middle |
Html :: a href type submit |
Html :: how to change tab logo html |
Html :: svg line |
Html :: hyperlink html |
Html :: chrome clear cache for one site |
Html :: routerlink forward ionic |
Html :: spawn mob without ai |
Html :: how to make a background color in html |
Html :: get input value on button click javascript |