예제 #1
0
        private Response getResponse(SimpleHttpResponse httpResponse)
        {
            Response response = new Response(httpResponse.getStatusCode());
            string   content  = httpResponse.getContent();

            if (!string.IsNullOrEmpty(content))
            {
                if (response.isSuccess())
                {
                    ErrorDetail errorDetail = JsonConvert.DeserializeObject <ErrorDetail>(content);
                    response.setErrorDetail(errorDetail);
                }
                else
                {
                    //logger.error("request failed!" + httpResponse);
                }
            }
            return(response);
        }
예제 #2
0
 public void setErrorDetail(ErrorDetail errorDetail)
 {
     this.errorDetail = errorDetail;
 }