XCode Wizard
XCode Wizard

Reputation: 1

Http POST body in Flex

Is there any way that I can set message body using POST/PUT HTTP methods in flex? or using REST with Flex in Browser ? Please help

PUT http://myurl:1234/myapi/changename

Accept: application/xml
Content-Type: application/xml

<SpecialService xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
   <SessionId>guid of session</SessionId>
   <UserName>ABC</UserName>
   <NewServiceName>My service xs</NewServiceName>
</SpecialService >

Upvotes: 0

Views: 488

Answers (1)

michael
michael

Reputation: 1160

In theory, flex doesn't support PUT or DELETE requests, but you can try "X-HTTP-Method-Override".

request.requestHeaders = [new URLRequestHeader("X-HTTP-Method-Override", "PUT")];

Have a look on the following: RESTful PUT/DELETE with AS3 using X-HTTP-Method-Override

similar question:How to send PUT HTTP Request in Flex

Upvotes: 1

Related Questions