Thankfully, most popular web frameworks provide some support to accomplish this. Ruby on Rails supports overriding the http method using the X-HTTP-Method-Override request header.
The below code tells the RoR server app to consider the request as a PUT operation:
var request:URLRequest = new URLRequest(resource);
request.data = dataToUpdateOnResource;
request.method = URLRequestMethod.POST;
request.requestHeaders.push(new URLRequestHeader("X-HTTP-Method-Override",
var loader:URLLoader = new URLLoader();
loader.load(request);
HTTP DELETE can be achieved using the same.
No comments:
Post a Comment