Esempio n. 1
0
 public HttpResponseMessage UnprocessableEntity(HttpErrorResponse errorResponse)
 {
     return(new HttpResponseMessage((HttpStatusCode)422)
     {
         Content = new StringContent(JsonConvert.SerializeObject(errorResponse), Encoding.UTF8,
                                     ContentApplicationType.ApplicationJSON)
     });
 }
Esempio n. 2
0
 public HttpResponseMessage Conflict(HttpErrorResponse errorResponse)
 {
     return(new HttpResponseMessage(HttpStatusCode.Conflict)
     {
         Content = new StringContent(JsonConvert.SerializeObject(errorResponse), Encoding.UTF8,
                                     ContentApplicationType.ApplicationJSON)
     });
 }