Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
455 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 Reply

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......


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...