.net Web API 2,return HttpResponseMessage with ObjectContent
Jun 07, 2016 pm 03:44 PMpublic 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)
{Content = new ObjectContent

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Detailed explanation of the usage of return in C language

What are the employment prospects of C#?

Share several .NET open source AI and LLM related project frameworks

React API Call Guide: How to interact and transfer data with the backend API

Oracle API Usage Guide: Exploring Data Interface Technology

Oracle API integration strategy analysis: achieving seamless communication between systems

How to enable administrative access from the cockpit web UI

How to deal with Laravel API error problems
