Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • Samples:

    • /person/add

      Use class CGI::Office::Contacts::Controller::Person, and call method add.

    • /organization_notes/delete/99

      Use class CGI::Office::Contacts::Controller::Organization::Notes, and call method delete, with an object id of 99.

    This is service trampled REST, very much still in the vein of old web services.

    Also, you haven't written about HTTP methods at all, which are the central piece. URLs denote things, therefore are just nouns, and the resources themselves are well-defined well-adopted types to aid interoperability. The verbs go in front and have standard semantics for the Web.

    To delete, use DELETE.

    DELETE /organization_notes/99 HTTP/1.1
    HTTP/1.1 410 Gone

    To create, use PUT.

    PUT /person/123 HTTP/1.1
    Content-Type: text/x-vcard

    HTTP/1.1 201 Created
    Location: /person/123

    But realistically, in most architectures you cannot know the id before you have made the request. The workaround is to POST to a collection, see AtomPub.