The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

peri-htserve - Serve Perl modules over HTTP(S) using the Riap::HTTP protocol

VERSION

This document describes version 0.41 of peri-htserve (from Perl distribution Perinci-Access-HTTP-Server), released on 2014-04-30.

SYNOPSIS

 # serve modules over HTTP, using default options (HTTP port 5000)
 $ peri-htserve Foo::Bar Baz::*

 # you can now do
 $ curl 'http://localhost:5000/Baz/SubMod/func1?arg1=1&arg2=2'
 [200,"OK",{"The":"result","...":"..."}]

 # or use the Perl client
 $ perl -MPerinci::Access -e'
     my $pa = Perinci::Access->new;
     my $res = $pa->request(call=>"http://localhost:5000/Foo/Bar/func2");'


 ### some other peri-htserve options:

 # change ports/etc (see http_ports, https_ports, and unix_sockets in Gepok doc)
 $ peri-htserve --http-ports "localhost:5000,*:80" ...

 # see all available options
 $ peri-htserve --help

DESCRIPTION

For now, please see source code for more details (or --help).

QUICK TIPS

Complex argument

In raw HTTP, you can send complex argument by encoding it in JSON, e.g.:

 $ curl 'http://localhost:5000/Foo/Bar/func?array:j=[1,2,3]'

Notice the ":j" suffix after parameter name.

TODO

  • Pass more Plackup options.

  • Pass more PSGI server options.

SEE ALSO

Riap::HTTP

Perinci::Access, Perinci::Access::HTTP::Client

PSGI servers used: Gepok, Starman

Plack::Runner

HOMEPAGE

Please visit the project's homepage at https://metacpan.org/release/Perinci-Access-HTTP-Server.

SOURCE

Source repository is at https://github.com/sharyanto/perl-Perinci-Access-HTTP-Server.

BUGS

Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Perinci-Access-HTTP-Server

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

AUTHOR

Steven Haryanto <stevenharyanto@gmail.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Steven Haryanto.

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