Skip to content
This repository

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

Closed
tony0918 opened this Issue · 5 comments

3 participants

Tony Mao Matthew Eernisse Larz Conwell
Tony Mao

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.

Matthew Eernisse
Owner

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?

Matthew Eernisse
Owner

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.

Tony Mao

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

Matthew Eernisse
Owner

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.

Tony Mao

Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.