=encoding utf-8 =head1 NAME =begin original Furl::Request - Request object for Furl =end original Furl::Request - Furl のリクエストオブジェクト =head1 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; =head1 DESCRIPTION =begin original This is a HTTP request object in Furl. =end original Furl の HTTP リクエストオブジェクトです。 =head1 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); =head1 INSTANCE METHODS (インスタンスメソッド) =over 4 =item $req->method($method) =begin original Gets/Sets HTTP request method =end original HTTP リクエストメソッドを取得/セットします。 =item $req->uri($uri) =begin original Gets/Sets request URI =end original リクエスト URI を取得/セットします。 =item $req->headers($headers) =begin original Gets/Sets instance of L =end original L のインスタンスを取得/セットします。 =item $req->content($content) =item $req->body($content) =begin original Gets/Sets request body in scalar. =end original スカラで、リクエストボディを取得/セットします。 =item $req->protocol($protocol) $req->protocol('HTTP/1.1'); print $req->protocol; #=> "HTTP/1.1" =begin original Gets/Sets HTTP protocol in string. =end original 文字列で HTTP プロトコルを取得/セットします。 =item $req->content_length =item $req->content_type =item $req->header =begin original Shorthand to access L. =end original Lに速記でアクセスします。 =item $req->as_http_request =begin original Make instance of L from L. =end original L から L のインスタンスを作ります。 =item $req->as_hashref =begin original Convert request object to HashRef. =end original リクエストオブジェクトをハッシュリファレンスにします。 =begin original Format is following: =end original フォマットは以下になります: method: Str uri: Str protocol: Str headers: ArrayRef[Str] content: Str =item $req->request_line print $req->request_line; #=> "GET / HTTP/1.1" =begin original Returns HTTP request line. =end original HTTP リクエストラインを返します。 =back