Leyland::Manual::FAQ - Frequently asked questions about Leyland
version 0.001007
The HTTP OPTIONS request method is used by clients to ask a server what are the HTTP methods they can perform on a certain resource (or URI path if you will). The server is supposed to answer with the response header "Allow", containing a list of valid methods, like "GET, POST, PUT".
OPTIONS
The good news for you is that Leyland already does this automatically for you. When it receives an OPTIONS request to a certain resource, it finds out all methods supported by it, and returns a proper answer to the client.
The HTTP HEAD request method is exactly similar to GET, except only the response headers are returned, without the response body. If you want to add support for HEAD requests in your Leyland applications, add the Head Plack middleware to app.psgi.
HEAD
GET
app.psgi
As you may know, Plack has some logging middlewares, like Plack::Middleware::LogDispatch, which provide PSGI applications with a logger. I really wanted to transfer logging resposibilities to these middlewares, but unfortunately they only provide a logger on a per-request basis, meaning the application itself will not have a logger, while the context object (which is request-specific) will. Granted, the request object is where the logger is most used, but I didn't want to leave the application without a logger, and decided Leyland will provide a logging mechanism of its own. Maybe I'll find a better solution in the future, we'll see.
This is the last stop of the Leyland manual. You can return to the table of contents if you wish or start writing your applications.
Ido Perlmuter, <ido at ido50.net>
<ido at ido50.net>
Please report any bugs or feature requests to bug-Leyland at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Leyland. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-Leyland at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Leyland::Manual::FAQ
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Leyland
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Leyland
CPAN Ratings
http://cpanratings.perl.org/d/Leyland
Search CPAN
http://search.cpan.org/dist/Leyland/
Copyright 2010-2011 Ido Perlmuter.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install Leyland, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Leyland
CPAN shell
perl -MCPAN -e shell install Leyland
For more information on module installation, please visit the detailed CPAN module installation guide.