MPM::Waldo - REST controller
Version 1.00
# 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>
REST controller
Base methods
See "handler" in MPMinus::REST
See "hInit" in MPMinus::REST
RAMST methods
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
mod_perl2, MPMinus, MPMinus::REST
mod_perl2
See TODO file
TODO
* none noted
MPMinus, MPMinus::REST, Examples on MPMinus
Serż Minus (Sergey Lepenkov) http://www.serzik.com <abalama@cpan.org>
Copyright (C) 1998-2019 D&D Corporation. All Rights Reserved
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/
LICENSE
To install MPMinus, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MPMinus
CPAN shell
perl -MCPAN -e shell install MPMinus
For more information on module installation, please visit the detailed CPAN module installation guide.