Ejemplo n.º 1
0
 public static Exception CreateFailedException(HttpClient restClient, HttpRequestMessage requestMessage, HttpRequestException ex)
 {
     return(RestClientException.Create(HttpStatusCode.InternalServerError,
                                       ex.Message,
                                       requestMessage.ToRestClientRequest(restClient.BaseAddress),
                                       new Response(string.Empty, 0)));
 }
Ejemplo n.º 2
0
 public static RestClientException CreateFailedException(RSharp.RestClient restClient, RSharp.IRestResponse restResponse)
 => RestClientException.Create(restResponse.StatusCode,
                               restResponse.StatusDescription,
                               restResponse.Request.ToRestClientRequest(restClient.BaseUrl),
                               restResponse.ToRestClientRequest());
Ejemplo n.º 3
0
 public static RestClientException CreateFailedException(HttpClient restClient, Request request, Response response, HttpResponseMessage httpResponse)
 => RestClientException.Create(httpResponse.StatusCode,
                               httpResponse.ReasonPhrase,
                               request,
                               response);