Home | Forum | Unread | Sign in | Sign in
Wirebird
Forum

blogs > rest > perl

Notes on the Perl-specific implementation of RESTful web design.
Subscribe | Unread | Recent | Group options | Topic options | Post
KarenCravens
Karen Cravens

Tue

Jul 17
2007

23:18Z

REST clients in Perl

I've been getting some search hits here for folks looking for Perl and
REST, and generally not finding what they want (at a guess). Partly
that's because hey, there's only one entry in this subcategory. But
most of my REST+Perl work is going to be on the server side, so I
probably won't have much to say about Perl-based clients, which seems
to be what most of the searching is for. 

Really, there's nothing all that special about writing clients for a
REST service. Unless you consider "RFC-compliant http" to be special,
which I guess it is. 

This means you have to do things like support PUT and DELETE in
addition to GET and POST. I support overloaded POST in Wirebird, since
I intend to support vanilla browsers, but not all services will do
this. 

You may also need to set your headers for Acccept and Accept-Language. 

It also means you have to pay attention to the http status code you get
back. 

LWP::UserAgent can do all these things. LWP::Simple can do all, I
think, except setting the headers (which is fine if you like the
defaults, whatever they are... */* for Accept, at least). 
Subject (required)




 
Refresh