NAME

MPM::Waldo - REST controller

VERSION

Version 1.00

SYNOPSIS

  # Apache2 config section
  <IfModule mod_perl.c>
    PerlOptions +GlobalRequest
    PerlModule MPM::Waldo
    <Location /waldo>
      PerlInitHandler MPM::Waldo
      PerlSetVar Location waldo
      PerlSetVar Debug on
      PerlSetVar TestValue Blah-Blah-Blah
    </Location>
  </IfModule>

DESCRIPTION

REST controller

METHODS

Base methods

handler

See "handler" in MPMinus::REST

hInit

See "hInit" in MPMinus::REST

RAMST METHODS

RAMST methods

GET /waldo

    curl -v --raw -H "Accept: application/json" http://localhost/waldo?bar=123

    > GET /waldo?bar=123 HTTP/1.1
    > Host: localhost
    > User-Agent: curl/7.50.1
    > Accept: application/json
    >
    < HTTP/1.1 200 OK
    < Date: Thu, 25 Apr 2019 12:30:55 GMT
    < Server: Apache/2.4.18 (Ubuntu)
    < Content-Length: 528
    < Content-Type: application/json
    <
    {
       "key" : "GET#/#default",
       "uri" : "/waldo",
       "dvars" : {
          "debug" : "on",
          "testvalue" : "Blah-Blah-Blah",
          "location" : "waldo"
       },
       "remote_addr" : "127.0.0.1",
       "name" : "getIndex",
       "usr" : {
          "bar" : "123"
       },
       "stamp" : "[26264] MPM::Foo at Thu Apr 25 15:30:55 2019",
       "code" : 200,
       "error" : "",
       "foo_attr" : "My foo attribute value",
       "servers" : [
          "MPM-Foo#waldo"
       ],
       "path" : "/",
       "server_status" : 1,
       "debug_time" : "0.003",
       "location" : "waldo"
    }

Examples:

    curl -v --raw http://localhost/waldo
    curl -v --raw -H "Accept: application/json" http://localhost/waldo
    curl -v --raw -H "Accept: application/xml" http://localhost/waldo
    curl -v --raw -H "Accept: application/x-yaml" http://localhost/waldo

DEPENDENCIES

mod_perl2, MPMinus, MPMinus::REST

TO DO

See TODO file

BUGS

* none noted

SEE ALSO

MPMinus, MPMinus::REST, Examples on MPMinus

AUTHOR

Serż Minus (Sergey Lepenkov) http://www.serzik.com <abalama@cpan.org>

COPYRIGHT

Copyright (C) 1998-2019 D&D Corporation. All Rights Reserved

LICENSE

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See LICENSE file and https://dev.perl.org/licenses/