Keep in mind that REST's 2nd most important feature is its catchy acronym, (Its most important feature being its beautiful simplicity).

You may be able to proceed with LWP::Simple calls (assuming stateless operations). LWP::Simple::Post may be needed *if* you know the right parameters, but I've had marginal luck getting the latter to function, so YMMV.

If you need to PUT or DELETE, you'll have to dig into LWP::UserAgent and HTTP::Request.

And once you've gotten your response to any of the above, you'll need a suitably capable XML processor...if you're lucky, just XML::Simple (if you're really lucky, just some crafty regexen).

FWIW: DBD::Amazon is REST based and, by far, that was the easiest part of the package development. I'm always amazed at the BFD that is made over SOAP interfaces. I guess the Java/Web Services crowd can't abide a solution that's less then a KLOC.

Go REST, young man, go REST!


Perl Contrarian & SQL fanboy

In reply to Re: Using REST in perl to access webservices by renodino
in thread Using REST in perl to access webservices by sugarboy

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.