Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
449 views
in Technique[技术] by (71.8m points)

actionscript 3 - How to send PUT HTTP Request in Flex

I want to send HTTP PUT Request on one URL to update that content of XML via using API.

URL is like this: https://domainname.com/someurls/id.xml

I want to update that content.

But When I am sending this PUT request, I have seen that in Network Monitor of Flex 4, Its going as the POST request on this web, while I am setting method as PUT in HTTPService variable.

So I am getting error. So is there any way to send the PUT request on the web ? Or Is there any special header to set PUT method ? I have tried method header but its not working....

Please help me.....

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I have found the solution to send the put and delete service with HTTPSerivce in flex.

You just have to send one more header with the service method POST.

You have to send data in the POST method and attach one more header X-HTTP-Method-Override and the value as the PUT or DELETE.

Your service will be send as PUT or DELETE.

Thanks......


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

56.9k users

...