public static HttpException Create(IRestResponse requestResult)
        {
            Arguments.CheckNotNull(requestResult, nameof(requestResult));

            var httpHeaders = LoggingHandler.ToHeaders(requestResult.Headers);

            return(Create(requestResult.Content, httpHeaders, requestResult.ErrorMessage, requestResult.StatusCode));
        }
Ejemplo n.º 2
0
        private async Task <IRestResponse> ExecuteAsync(RestRequest request)
        {
            BeforeIntercept(request);

            var response = await RestClient.ExecuteAsync(request).ConfigureAwait(false);

            RaiseForInfluxError(response, response.Content);

            response.Content = AfterIntercept(
                (int)response.StatusCode,
                () => LoggingHandler.ToHeaders(response.Headers),
                response.Content);

            return(response);
        }
Ejemplo n.º 3
0
 partial void InterceptResponse(IRestRequest request, IRestResponse response)
 {
     AfterIntercept((int)response.StatusCode, () => LoggingHandler.ToHeaders(response.Headers), response.Content);
 }