Exemple #1
0
 internal RestResponse(HttpWebResponse response)
 {
     _response   = response;
     Advanced    = new AdvancedRestResponse(_response);
     Error       = string.Empty;
     ErrorStatus = WebExceptionStatus.Success;
     HttpMethod  = HttpMethod.ALL.FromString(_response.Method);
     StatusCode  = (HttpStatusCode)(int)_response.StatusCode;
 }
Exemple #2
0
 internal RestResponse(HttpWebResponse response)
 {
     _response   = response;
     Advanced    = new AdvancedRestResponse(_response);
     ContentType = ContentType.DEFAULT.FromString(_response.ContentType);
     Error       = string.Empty;
     ErrorStatus = WebExceptionStatus.Success;
     HttpMethod  = (HttpMethod)Enum.Parse(typeof(HttpMethod), _response.Method);
     StatusCode  = (HttpStatusCode)(int)_response.StatusCode;
 }