ktats****@users*****
ktats****@users*****
2011年 2月 12日 (土) 11:58:02 JST
Index: docs/modules/Furl-0.24/lib/Furl/HTTP.pod diff -u docs/modules/Furl-0.24/lib/Furl/HTTP.pod:1.1 docs/modules/Furl-0.24/lib/Furl/HTTP.pod:1.2 --- docs/modules/Furl-0.24/lib/Furl/HTTP.pod:1.1 Thu Feb 10 11:33:30 2011 +++ docs/modules/Furl-0.24/lib/Furl/HTTP.pod Sat Feb 12 11:58:02 2011 @@ -69,19 +69,30 @@ =end original +æ°ããFurlã¯ã©ã¤ã¢ã³ããI<%args>ã§ä½ãã¾ããã¨ã©ã¼ãããã¨æ»ã«ã¾ãã - +=begin original I<%args> might be: +=end original + +I<%args> ã¯: + =over =item agent :Str = "Furl/$VERSION" =item timeout :Int = 10 +=begin original + Seconds until the call to $furl->request returns a timeout error (as an internally generated 500 error). The timeout might not be accurate since some underlying modules / built-ins function may block longer than the specified timeout. See the FAQ for how to support timeout during name resolution. +=end original + +$furl->request ã®å¼åºãã¿ã¤ã ã¢ã¦ãããã¼ãè¿ãã¾ã§ã®ç§æ°(å é¨çã«500ã¨ã©ã¼)ãåºç¤ã¨ãªãã¢ã¸ã¥ã¼ã«/çµè¾¼ã®é¢æ°ãæå®ã®æéããé·ããããã¯ãããããããªãã®ã§ãã¿ã¤ã ã¢ã¦ãã¯æ£ç¢ºã§ã¯ãªããããããã¾ãããåå解決æã®ã¿ã¤ã ã¢ã¦ããµãã¼ãããæ¹æ³ã¯FAQãè¦ã¦ãã ããã + =item max_redirects :Int = 7 =item proxy :Str @@ -92,39 +103,101 @@ =item header_format :Int = HEADERS_AS_ARRAYREF +=begin original + This option choose return value format of C<< $furl->request >>. +=end original + +ãã®ãªãã·ã§ã³ã§ã¯C<<$furl->request>>ã®è¿ãå¤ã®ãã©ã¼ããããé¸ã³ã¾ãã + +=begin original + This option allows HEADERS_NONE or HEADERS_AS_ARRAYREF. +=end original + +HEADERS_NONE ã HEADERS_AS_ARRAYREF ã使ãã¾ãã + +=begin original + B<HEADERS_AS_ARRAYREF> is a default value. This makes B<$headers> as ArrayRef. +=end original + +B<HEADERS_AS_ARRAYREF>> ã¯ããã©ã«ãå¤ã§ããB<$headers>ãArrayRefã¨ãã¦ä½ãã¾ãã + +=begin original + B<HEADERS_NONE> makes B<$headers> as undef. Furl does not return parsing result of headers. You should take needed headers from B<special_headers>. +=end original + +B<HEADERS_NONE> B<$headers> ã undef ã«ãã¾ããFurlãããã解æããçµæãè¿ãã¾ããã B<special_headers>ããå¿ è¦ãªãããåãã¨ãã¹ãã§ãã + =item connection_pool +=begin original + This is the connection pool object for keep-alive requests. By default, it is a instance of L<Furl::ConnectionCache>. +=end original + +keep-aliveãªã¯ã¨ã¹ãç¨ã®ã³ãã¯ã·ã§ã³ãã¼ã«ãªãã¸ã§ã¯ãã§ããããã©ã«ãã§ã¯L<Furl::ConnectionCache>ã®ã¤ã³ã¹ã¿ã³ã¹ã§ãã + +=begin original + You may not customize this variable otherwise to use L<Coro>. This attribute requires a duck type object. It has two methods, C<< $obj->steal($host, $port >> and C<< $obj->push($host, $port, $sock) >>. +=end original + +L<Coro> ã使ã以å¤ã®æ¹æ³ã§ãã®å¤ãã«ã¹ã¿ãã¤ãºã§ããªãã§ãããããã®ã¢ããªãã¥ã¼ãã¯ããã¯ã¿ã¤ããªãã¸ã§ã¯ããå¿ è¦ã¨ãã¾ãã2ã¤ã®ã¡ã½ãããC<< $obj->steal($host, $port >> 㨠C<< $obj->push($host, $port, $sock) >> ãããã¾ãã + =item stop_if +=begin original + A callback function that is called by Furl after when a blocking function call returns EINTR. Furl will abort the HTTP request and return immediately if the callback returns true. Otherwise the operation is continued (the default behaviour). +=end original + +ããããã³ã°é¢æ°ãEINTRãå¼ãã å¾ã«Furlãå¼ã¶ã³ã¼ã«ããã¯é¢æ°ã§ããã³ã¼ã«ããã¯ãçãªããFurlã¯HTTPãªã¯ã¨ã¹ããä¸æããå³åº§ã«æ»ãã¾ããããã§ãªããã°ããªãã¬ã¼ã·ã§ã³ã¯ç¶è¡ããã¾ã(ããã©ã«ãã®æå)ã + =item inet_aton +=begin original + A callback function to customize name resolution. Takes two arguments: ($hostname, $timeout_in_seconds). If omitted, Furl calls L<Socket::inet_aton>. +=end original + +åå解決ãã«ã¹ã¿ãã¤ãºããããã®ã³ã¼ã«ããã¯é¢æ°ã§ãã2ã¤ã®å¼æ°ãåãã¾ã: ($hostname, $timeout_in_seconds)ãçç¥ããã¨ãFurlã¯L<Socket::inet_aton>ãå¼ã³ã¾ãã + =back =head2 Instance Methods =head3 C<< $furl->request(%args) :($protocol_minor_version, $code, $msg, \@headers, $body) >> +=begin original + Sends an HTTP request to a specified URL and returns a protocol minor version, status code, status message, response headers, response body respectively. +=end original + +HTTPãªã¯ã¨ã¹ããæå®ããURLã¸éãããããã³ã«ã®ãã¤ãã¼ãã¼ã¸ã§ã³ãã¹ãã¼ã¿ã¹ã³ã¼ãã +ã¹ãã¼ã¿ã¼ã¹ã¡ãã»ã¼ã¸ãã¬ã¹ãã³ã¹ãããã¼ãã¬ã¹ãã³ã¹ããã£ã¼ãããããè¿ãã¾ãã + + +=begin original + I<%args> might be: +=end original + +I<%args> ã¯: + =over =item scheme :Str = "http" @@ -349,14 +422,14 @@ Net::SSL ã¯ããã¥ã¡ã³ãã貧弱ã§ãã +=item env_proxy ã¯ãªããªãã·ã§ãã«ãªã®ã§ãã? + =begin original =item Why is env_proxy optional? =end original -=item env_proxy ã¯ãªããªãã·ã§ãã«ãªã®ã§ãã? - =begin original Environment variables are highly dependent on each users' environment, @@ -367,14 +440,14 @@ ç°å¢å¤æ°ã¯ã¦ã¼ã¶ã¼ã®ç°å¢ã«å¼·ãä¾åãã¾ãã ãã¾ãåããªãã¨ãã«ã¦ã¼ã¶ã¼ãæ··ä¹±ããã¾ãã +=item ãµãã¼ããã¦ãããªãã¬ã¼ãã£ã³ã°ã·ã¹ãã ã¯? + =begin original =item What operating systems are supported? =end original -=item ã©ã®ãªãã¬ã¼ãã£ã³ã°ã·ã¹ãã ããµãã¼ããã¾ãã? - =begin original Linux 2.6 or higher, OSX Tiger or higher, Windows XP or higher. @@ -391,14 +464,14 @@ ããªããããããéãã°ãä»ã®ãªãã¬ã¼ãã£ã³ã°ã·ã¹ãã ããµãã¼ããããã§ãããã +=item ãªãFurlã¯ãã£ã³ã¯ãããã¢ãããã¼ãããµãã¼ãããªãã®ã§ãã? + =begin original =item Why doesn't Furl support chunked upload? =end original -=item ãªãFurlã¯ãã£ã³ã¯ãããã¢ãããã¼ãããµãã¼ãããªãã®ã§ãã? - =begin original There are reasons why chunked POST/PUTs should not be used in general. @@ -430,7 +503,10 @@ =end original -These facts together makes using chunked requests virtually impossible (unless you _know_ that the server supports HTTP/1.1), and this is why we decided that supporting the feature is NOT of high priority. +ãããã®è¦å ã§ãã£ã³ã¯ããããªã¯ã¨ã¹ãã使ãã®ã¯äºå®ä¸ä¸å¯è½ã§ã(ãµã¼ããHTTP/1.1ããµãã¼ããã¦ããã¨ããã£ã¦ããªããã°)ã +ãã®ããããã®æ©è½ã®ãµãã¼ãã¯é«ããã©ã¤ãªãªãã£ã§ã¯ããã¾ããã + +=item å°éããã¬ã¹ãã³ã¹ã®å 容ãã©ã®ããã«ä½ãã¾ãã? =begin original @@ -438,8 +514,6 @@ =end original -=item å°éããã¬ã¹ãã³ã¹ã®å 容ãã©ã®ããã«ä½ãã¾ãã? - =begin original You can use L<IO::Callback> for this purpose. @@ -459,14 +533,14 @@ $furl->put( "http://127.0.0.1:$port/", [ 'Content-Length' => $len ], $fh, ); +=item gzip/deflate å§ç¸®ãããã³ãã¥ãã±ã¼ã·ã§ã³ã使ãã¾ãã? + =begin original =item How do you use gzip/deflate compressed communication? =end original -=item gzip/deflate å§ç¸®ãããã³ãã¥ãã±ã¼ã·ã§ã³ã使ãã¾ãã? - =begin original Add an B<Accept-Encoding> header to your request. Furl inflates response bodies transparently according to the B<Content-Encoding> response header. @@ -475,14 +549,14 @@ B<Accept-Encoding>ãããããªã¯ã¨ã¹ãã«è¿½å ãã¦ãã ãããFurlã¬ã¹ãã³ã¹ããã£ã¼ãB<Content-Encoding>ã¬ã¹ãã³ã¹ãããã«å¾ã£ã¦ééçã«ã¤ã³ãã¬ã¼ããã¾ãã +=item mutipart/form-data ã使ãã«ã¯? + =begin original =item How do you use mutipart/form-data? =end original -=item mutipart/form-data ã使ãã«ã¯? - =begin original You can use multipart/form-data with L<HTTP::Request::Common>. @@ -513,14 +587,14 @@ ããããéããã¨ãã§ãããªããL<Furl>ã§ãã¤ãã£ãã®multipart/form-dataãµãã¼ãã¯å©ç¨å¯è½ã§ãã +=item Kee-Alive ãã©ããã£ã¦ä½¿ãã®ãã¨HEADã¡ã½ããã§ã¯ä½ãèµ·ããã®ã? + =begin original =item How do you use Keep-Alive and what happens on the HEAD method? =end original -=item Kee-Alive ãã©ããã£ã¦ä½¿ãã®ãã¨HEADã¡ã½ããã§ã¯ä½ãèµ·ããã®ã? - =begin original Furl supports HTTP/1.1, hence C<Keep-Alive>. However, if you use the HEAD @@ -571,16 +645,14 @@ ãããã«ãããHEADã¡ã½ããã¯ãä»æ¥ã§ã¯ããããªã«æç¨ã§ã¯ããã¾ãããGETã¡ã½ãã㨠C<If-Modified-Sinse>ã®ã»ããHTTPã³ã³ãã³ãããã£ãã·ã¥ããã®ã«åã£ã¦ãã¾ãã +=item ãªãFurlã¯ã¿ã¤ã ã¢ã¦ãã¨ã©ã¼ãè¿ãã¾ã§æå®ããé·ããããã®ã§ãã? + =begin original =item Why does Furl take longer than specified until it returns a timeout error? =end original -=item Why does Furl take longer than specified until it returns a timeout error? - -ãªãFurlã¯ã¿ã¤ã ã¢ã¦ãã¨ã©ã¼ãè¿ãã¾ã§æå®ããé·ããããã®ã§ãã? - =begin original Although Furl itself supports timeout, some underlying modules / functions do not. And the most noticeable one is L<Socket::inet_aton>, the function used for name resolution (a function that converts hostnames to IP addresses). If you need accurate and short timeout for name resolution, the use of L<Net::DNS::Lite> is recommended. The following code snippet describes how to use the module in conjunction with Furl. @@ -673,8 +745,14 @@ =head2 è²¢ç®ããã«ã¯ +=begin original + Please send the pull-req via L<http://github.com/tokuhirom/p5-Furl/>. +=end original + +L<http://github.com/tokuhirom/p5-Furl/>ã«pull-reqãéã£ã¦ãã ããã + =head1 åç § L<LWP>