NAME

Net::HTTP::Knork::Request - HTTP request object from SPORE env hash

VERSION

version 0.20

SYNOPSIS

use Net::HTTP::Knork::Request;

my $request = Net::HTTP::Knork::Request->new($env);

DESCRIPTION

Net::HTTP::Knork::Request create a HTTP request It is based on Net::HTTP::Spore::Request, but with two exceptions:

  • It uses Moo instead of Moose

  • If no encoding is specified for payloads, the default behaviour is to send a 'application/x-www-form-urlencoded' payload.

METHODS

new
my $req = Net::HTTP::Knork::Request->new();

Creates a new Net::HTTP::Knork::Request object.

env
my $env = $request->env;

Get the environment for the given request

method
my $method = $request->method;

Get the HTTP method for the given request

port
my $port = $request->port;

Get the HTTP port from the URL

script_name
my $script_name = $request->script_name;

Get the script name part from the URL

path
path_info
my $path = $request->path_info;

Get the path info part from the URL

request_uri
my $request_uri = $request->request_uri;

Get the request uri from the URL

scheme
my $scheme = $request->scheme;

Get the scheme from the URL

secure
my $secure = $request->secure;

Return true if the URL is HTTPS

content
body
input
my $input = $request->input;

Get the content that will be posted

query_string
headers
uri
query_parameters
base
new_response
finalize

AUTHOR

Emmanuel Peroumalnaïk

COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by E. Peroumalnaik.

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