=encoding euc-jp =head1 NAME =begin original HTTP::Request - HTTP style request message =end original HTTP::Request - HTTP 形式のリクエストメッセージ =head1 SYNOPSIS require HTTP::Request; $request = HTTP::Request->new(GET => 'http://www.example.com/'); =begin original and usually used like this: =end original そして通常は以下のようにして使います: $ua = LWP::UserAgent->new; $response = $ua->request($request); =head1 DESCRIPTION =begin original C is a class encapsulating HTTP style requests, consisting of a request line, some headers, and a content body. Note that the LWP library uses HTTP style requests even for non-HTTP protocols. Instances of this class are usually passed to the request() method of an C object. =end original C クラスは HTTP 形式のリクエストをカプセル化します。 レスポンスはリクエスト行、いくつかのヘッダ、そして内容の本体(content body)で 構成されます。 LWP ライブラリは HTTP プロトコルでないスキームにも、HTTP 形式のリクエストを 使っていることに注意してください。 このクラスのインスタンスは普通は C オブジェクトの request() メソッドに渡されます。 =begin original C is a subclass of C and therefore inherits its methods. The following additional methods are available: =end original C は C のサブクラスなので、そのメソッドを 継承しています。 以下の追加のメソッドが利用できます: =over 4 =item $r = HTTP::Request->new( $method, $uri ) =item $r = HTTP::Request->new( $method, $uri, $header ) =item $r = HTTP::Request->new( $method, $uri, $header, $content ) =begin original Constructs a new C object describing a request on the object $uri using method $method. The $method argument must be a string. The $uri argument can be either a string, or a reference to a C object. The optional $header argument should be a reference to an C object or a plain array reference of key/value pairs. The optional $content argument should be a string of bytes. =end original オブジェクト $uri へメソッド $method を使ったリクエストについて記述する C オブジェクトを組みたてます。 $method 引数は文字列でなければなりません。 $uri 引数は文字列か C オブジェクトへのリファレンスが指定できます。 オプションの $header 引数は C オブジェクトへの リファレンスか、キー/値のペアの配列へのリファレンスでなければなりません。 オプションの $content 引数はバイト列の文字列です。 =item $r = HTTP::Request->parse( $str ) =begin original This constructs a new request object by parsing the given string. =end original これは、与えられた文字列をパースすることによって新しいリクエスト オブジェクトを構築します。 =item $r->method =item $r->method( $val ) =begin original This is used to get/set the method attribute. The method should be a short string like "GET", "HEAD", "PUT" or "POST". =end original これはメソッド属性を取得/設定するために使われます。 メソッドは "GET", "HEAD", "PUT", "POST" のような短い文字列であるべきです。 =item $r->uri =item $r->uri( $val ) =begin original This is used to get/set the uri attribute. The $val can be a reference to a URI object or a plain string. If a string is given, then it should be parseable as an absolute URI. =end original これは uri 属性を取得/設定するために使います。 $val は URI オブジェクトか普通の文字列のどちらかです。 文字列が与えられた場合、絶対 URI として解析できるものでなければなりません。 =item $r->header( $field ) =item $r->header( $field => $value ) =begin original This is used to get/set header values and it is inherited from C via C. See L for details and other similar methods that can be used to access the headers. =end original これはヘッダの値を取得/設定するために使い、これは C から C 経由で継承されます。 詳細と、ヘッダにアクセスするために使われる同様のメソッドについては L を参照してください。 =item $r->content =item $r->content( $bytes ) =begin original This is used to get/set the content and it is inherited from the C base class. See L for details and other methods that can be used to access the content. =end original これは内容を取得/設定するために使い、これは C 基底クラスから 継承されます。 詳細と、内容にアクセスするために使われるその他のメソッドについては L を参照してください。 =begin original Note that the content should be a string of bytes. Strings in perl can contain characters outside the range of a byte. The C module can be used to turn such strings into a string of bytes. =end original 内容はバイト列であることに注意してください。 perl での文字列はバイトの範囲外の文字を含むことができます。 C モジュールはそのような文字列をバイト列に変換できます。 =item $r->as_string =item $r->as_string( $eol ) =begin original Method returning a textual representation of the request. =end original リクエストのテキスト形式表現を返します。 =back =head1 SEE ALSO L, L, L, L =head1 COPYRIGHT Copyright 1995-2004 Gisle Aas. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =begin meta Translated: Hippo2000 (5.48) Updated: Kentaro SHIRAKATA (5.813) =end meta