GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  FURL::REQUEST (3)

.ds Aq ’

NAME

Furl::Request - Request object for Furl

CONTENTS

SYNOPSIS



    my $f = Furl->new;
    my $req = Furl::Request->new($method, $uri, $headers, $content);
    my $res = $f->request($req);

    print $req->request_line, "\n";
    my $http_req = $req->as_http_request;
    my $req_hash = $req->as_hashref;



DESCRIPTION

This is a HTTP request object in Furl.

CONSTRUCTOR



    my $req = Furl::Request->new($method, $uri);
    # or
    my $req = Furl::Request->new($method, $uri, \%headers);
    # or
    my $req = Furl::Request->new($method, $uri, \%headers, $content);

    # and

    my $req = Furl::Request->parse($http_request_raw_string);



INSTANCE METHODS

$req->method($method) Gets/Sets HTTP request method
$req->uri($uri) Gets/Sets request URI
$req->headers($headers) Gets/Sets instance of Furl::Headers
$req->content($content)
$req->body($content) Gets/Sets request body in scalar.
$req->protocol($protocol)


    $req->protocol(HTTP/1.1);
    print $req->protocol; #=> "HTTP/1.1"



Gets/Sets HTTP protocol in string.

$req->content_length
$req->content_type
$req->header Shorthand to access Furl::Headers.
$req->as_http_request Make instance of HTTP::Request from Furl::Request.
$req->as_hashref Convert request object to HashRef.

Format is following:



    method: Str
    uri: Str
    protocol: Str
    headers: ArrayRef[Str]
    content: Str



$req->request_line


    print $req->request_line; #=> "GET / HTTP/1.1"



Returns HTTP request line.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 FURL::REQUEST (3) 2016-04-03

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.