Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Are all .cgi helper modules unfit for http methods common in REST?

by hossman (Prior)
on Aug 12, 2010 at 22:32 UTC ( [id://854778]=note: print w/replies, xml ) Need Help??


in reply to Are all .cgi helper modules unfit for http methods common in REST?

I haven't drunken a lot of REST Kool-Aid, but i know enough to know that REST != CGI. REST isn't a subset or a superset of CGI for that matter. They are largely orthogonal concepts, overlapping only in as much as they both use HTTP for transport.

Note in particular that RFC 3875 specifically identifies only 3 valid HTTP Methods for CGI (HEAD, GET, and POST). Quite simply: if a CGI related Perl module is moderately useful for writing REST resources, that's a perk above and beyond the scope of it's primary function as a CGI library. Complaining that it doesn't support everything you need to implement a REST resource is like complaining that an XML Parsing module doesn't support everything you need to parse crufty HTML found in the wild.

Have you perchance considered using REST::Resource or REST::Application?

Replies are listed 'Best First'.
Re^2: Are all .cgi helper modules unfit for http methods common in REST?
by isync (Hermit) on Aug 13, 2010 at 09:51 UTC
    That was a good hint!

    I was too centered on this CGI::Application / (it can do anything, so why not provide a REST API) idea that I didn't realize it might make sense to look around cpan in the REST namespace... Thanks!

    (interesting, REST::Application is built around CGI.pm.., I'll see how this behaves.. see above 'keywords' observation)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://854778]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2024-03-28 08:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found