Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I'm in the middle of updating an existing site which is implemented entirely as a CGI::Application script.
I'm struggling to understand how I can easily update it to work in a RESTful method, which I understand means that I should have both logical URIs and sensible use of the request method. So for example I'd expect:
GET http://example.com/products/all
Should return a list of all products.
Similarly, subject to authentication, the following should add a new one:
PUT /etc/passwd http://example.com/products/add
I've been generally familiar with CGI::Application in the past, but I've never had to handle either the PUT, LIST, or DELETE primitives, and I'm not 100% sure how to configure either the CGI::Application section, or the Apache configuration itself. (Does that even need to be mentioned?)
I assume that the return type will be JSON, YAML, or similar, but I expect I can manage fudging that myself ;)<?p>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Struggling to understand making CGI::Application RESTFUL
by Your Mother (Archbishop) on Jun 07, 2010 at 22:13 UTC | |
by derby (Abbot) on Jun 08, 2010 at 11:53 UTC | |
by Your Mother (Archbishop) on Jun 08, 2010 at 16:31 UTC | |
by Anonymous Monk on Jun 07, 2010 at 22:47 UTC |