Eve::PsgiStub - a stub class to easily create mock versions of HTTP requests.
use Eve::PsgiStub; my $request = Eve::PsgiStub->get_request( 'method' => $method_string, 'uri' => $uri_string, 'host' => $domain_strin, 'query' => $query_string, 'cookie' => $cookie_string);
Eve::PsgiStub is a helper abstract factory class that generates HTTP requests for making tests easier.
Returns a Eve::HttpRequest::Psgi object based on arguments. All arguments are optional.
uri
a request URI part string, defaults to /,
/
host
a request host string, defaults to example.localhost,
example.localhost
query
a request URI query string part, defaults to an empty string,
method
a request method string, defaults to GET
GET
body
a request body, defaults to an empty string
cookie
a request Set-Cookie string, defaults to an empty string,
Set-Cookie
content_type
a request content-type string, defaults to an empty string.
content-type
Copyright 2010-2013 Sergey Konoplev, Igor Zinovyev.
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 Eve, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Eve
CPAN shell
perl -MCPAN -e shell install Eve
For more information on module installation, please visit the detailed CPAN module installation guide.