这就是我发送的方式:
var request:URLRequest = new URLRequest(url);
request.requestHeaders.push(new URLRequestHeader("Accept", "application/json"));
request.method = URLRequestMethod.POST;
request.data = { id:1, name:"hello" };
var loader:URLLoader = new URLLoader;
configureListeners(loader);
loader.load(request);
这就是我收到的方式:
public HttpResponseMessage Post(object data)
{
return Request.CreateResponse(HttpStatusCode.OK, data);
}
但data
这里是{}
。