How to call the webservice by flash(ActionScript 2)? #196

Closed
tony0918 opened this Issue Sep 24, 2012 · 5 comments

3 participants

@tony0918

When I call a webservice implemented by Geddy,I get the error code "405". I have set the "content-type".
The log shows below:

[Mon, 24 Sep 2012 09:58:43 GMT]  127.0.0.1 - - [Mon Sep 24 2012 17:58:43 GMT+0800 (CST)] "POST /users/register.json 1.0" 405 27 "-" "Shockwave Flash" 

Please everyone can help me?Thanks.

@mde

A 405 means you're trying to hit a route you've actually defined but with a method it does not support. What does your router.js look like?

@mde

I should add, ActionScript is known for not supporting a number of the normal REST HTTP methods (PUT and DELETE), so you have to use an HTTP method-override. Use a POST, and either set the "X-Http-Method-Override" header with the value you want, or use the "_method" parameter in the query string.

@tony0918

�All right.Use a POST.But the "X-Http-Method-Override" means ?
Thanks.

@mde

X-Http-Method-Override is an HTTP header you can set in the request. From Flash it's probably just easier to use the "_method" URL parameter.

@tony0918

Thanks a lot!

@tony0918 tony0918 closed this Sep 25, 2012
@larzconwell larzconwell reopened this Sep 25, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment