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).

--MidLifeXis


In reply to Re: REST Protocol using Perl by MidLifeXis
in thread REST Protocol using Perl by perl@1983

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.