views:

547

answers:

2

My Flex UI is communicating with a local HTTP server through a REST-inspired API. I want to be able to use HTTP's put, delete and head methods as part of the API. Currently, whenever I use mx.rpc.http.HTTPService and set the method to something other than get or post, the server only sees a get. The Adobe docs for HTTPService say:

You use the tag to represent an HTTPService object in an MXML file. When you call the HTTPService object's send() method, it makes an HTTP request to the specified URL, and an HTTP response is returned. Optionally, you can pass parameters to the specified URL. When you do not go through the server-based proxy service, you can use only HTTP GET or POST methods. However, when you set the useProxy property to true and you use the server-based proxy service, you can also use the HTTP HEAD, OPTIONS, TRACE, and DELETE methods.

I don't know what the "server-based proxy service" refers to, and it's especially unclear as I'm trying to communicate with the local server. Any clarifications? More specifically, I would like to discover how I can enable my Flex code to send a full range of HTTP verbs to a local server.

Thanks,

Ian

+1  A: 

Take a look at this document:

http://marxsoftware.blogspot.com/2008/04/first-look-at-blazeds-rpc-mechanisms.html

BobbyShaftoe
Thanks for the link Bobby. I'm left still unclear why HTTPService with BlazeDS can exercise more of HTTP than HTTPService alone. It also seems as though the server running BlazeDS proxy would have to proxy a connection to itself, which is ... unintuitive.
Ian Dickinson
+1  A: 

Take a look at this similar post which I believe will answer your question: http://stackoverflow.com/questions/153420/is-it-feasible-to-create-a-rest-client-with-flex#153589

Brandon