Not quite sure what you mean by sending a message using REST protocol. REST is a set of resources identified by URLs, actions identified by the HTTP verbs GET (get this resource), PUT* (save / replace this resource), POST* (send some data to this resource), and DELETE (delete this resource), and document types negotiated with the HTTP headers (Accept, Content-type, and so on). Basically, REST is just HTTP.
Are you asking how to design an application to use REST techniques? Perhaps how to respond to an HTTP request in a REST application? If you treat it just as HTTP requests as documented above, LWP, Mechanize, and REST should be some good starting points.
* - The semantics of PUT and POST are often confused, and consensus may not always be found. These are the definitions that clicked and seem to make the most sense (at least to me). The alternative, that POST is create and PUT is update (or even the reverse), leads to some very difficult form handling (no, you have to PUT the attribute foo at widgets/widgetid/foo, and bar at widgets/widgetid/bar, you cannot just POST bar and foo to widgets/widgetid).
| [reply] |
Thanks for the reply MidLifeXis. Actually, I have a server which accepts REST requests. My requirement is to send REST message to that server and receive the response (using a Perl script). I also searched for resources online, but some of them like http://search.cpan.org/~mcrawfor/REST-Client-88/lib/REST/Client.pm are not available in my office that's why I am looking for alternatives.
Please let me know if this helps to understand the requirement.
| [reply] |
| [reply] |
| [reply] |