Rumah > Artikel > pangkalan data > .net Web API 2,return HttpResponseMessage with ObjectContent
public async TaskHttpResponseMessage Register(AllenRegistration model) { 1. Will return 400 Error return Request.CreateResponse( HttpStatusCode.BadReques t); 2. Will return Json Type like {return1:A,returnBL:B} return new HttpResponseMessa
public async Task
{
1.
Will return 400 Error
return Request.CreateResponse(HttpStatusCode.BadRequest);
2.
Will return Json Type like {"return1":"A","returnB"L:"B"}
return new HttpResponseMessage(HttpStatusCode.OK)
{