开发者

More HTTP verbs with AS3?

开发者 https://www.devze.com 2023-01-02 08:22 出处:网络
I\'m developing a social game in Flash with a team of developers.Our server-side guy has developed a really slick RESTful API for the Flash client to talk to.A lot of the client-server interactions in

I'm developing a social game in Flash with a team of developers. Our server-side guy has developed a really slick RESTful API for the Flash client to talk to. A lot of the client-server interactions involve adding and removing objects from a persistent world, so the API makes extensive use of the PUT and DELETE verbs.

The problem is, the URLRequest开发者_运维技巧 object in AS3 only supports the GET and POST verbs.

We're on a strict schedule, and we'd really rather not have to rewrite the whole API to just use GET and POST. Has anyone come up with a good way to get Flash to send other verbs?


This appears to be the project to use. as3httpclient

HTTPURLLoader also provides different HTTP status messages and can be used for different HTTP methods.for different HTTP methods.


Flash Player 10.1 offers native support for all of the verbs. I've run into permissions issues with the socket connections in the latest versions of Flash Player, so you might have to switch over to native functionality soon, or support both ways of accessing REST.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号