HTTP-Tiny-0.012 >
0.017
との差分
HTTP::Tiny 0.017 と 0.012 の差分
1 | 1 | |
2 | =encoding euc-jp | |
3 | ||
4 | 2 | =pod |
5 | 3 | |
4 | =encoding euc-jp | |
5 | ||
6 | 6 | =head1 NAME |
7 | 7 | |
8 | 8 | =begin original |
9 | 9 | |
10 | 10 | HTTP::Tiny - A small, simple, correct HTTP/1.1 client |
11 | 11 | |
12 | 12 | =end original |
13 | 13 | |
14 | 14 | HTTP::Tiny - 小さく、シンプルで、正しい HTTP/1.1 クライアント |
15 | 15 | |
16 | 16 | =head1 VERSION |
17 | 17 | |
18 | 18 | =begin original |
19 | 19 | |
20 | version 0.01 | |
20 | version 0.012 | |
21 | 21 | |
22 | 22 | =end original |
23 | 23 | |
24 | バージョン 0.01 | |
24 | バージョン 0.012 | |
25 | 25 | |
26 | 26 | =head1 SYNOPSIS |
27 | 27 | |
28 | 28 | use HTTP::Tiny; |
29 | 29 | |
30 | 30 | my $response = HTTP::Tiny->new->get('http://example.com/'); |
31 | 31 | |
32 | 32 | die "Failed!\n" unless $response->{success}; |
33 | 33 | |
34 | 34 | print "$response->{status} $response->{reason}\n"; |
35 | 35 | |
36 | 36 | while (my ($k, $v) = each %{$response->{headers}}) { |
37 | 37 | for (ref $v eq 'ARRAY' ? @$v : $v) { |
38 | 38 | print "$k: $_\n"; |
39 | 39 | } |
40 | 40 | } |
41 | 41 | |
42 | 42 | print $response->{content} if length $response->{content}; |
43 | 43 | |
44 | 44 | =head1 DESCRIPTION |
45 | 45 | |
46 | 46 | =begin original |
47 | 47 | |
48 | This is a very simple HTTP/1.1 client, designed for doing simple GET | |
48 | This is a very simple HTTP/1.1 client, designed primarily for doing simple GET | |
49 | 49 | requests without the overhead of a large framework like L<LWP::UserAgent>. |
50 | 50 | |
51 | 51 | =end original |
52 | 52 | |
53 | これはとてもシンプルな HTTP/1.1 クライアントで、 | |
53 | これはとてもシンプルな HTTP/1.1 クライアントで、基本的には | |
54 | 54 | L<LWP::UserAgent> のような大きなフレームワークのオーバーヘッドなしに |
55 | 55 | 単純な GET リクエストを実行するために設計されています。 |
56 | 56 | |
57 | 57 | =begin original |
58 | 58 | |
59 | 59 | It is more correct and more complete than L<HTTP::Lite>. It supports |
60 | 60 | proxies (currently only non-authenticating ones) and redirection. It |
61 | 61 | also correctly resumes after EINTR. |
62 | 62 | |
63 | 63 | =end original |
64 | 64 | |
65 | 65 | これは L<HTTP::Lite> よりも正しく、完全です。 |
66 | 66 | これはプロキシ (現在のところ認証なしのもののみ) および |
67 | 67 | リダイレクトに対応しています。 |
68 | 68 | また、EINTR の後正しく再開します。 |
69 | 69 | |
70 | 70 | =head1 METHODS |
71 | 71 | |
72 | 72 | =head2 new |
73 | 73 | |
74 | 74 | $http = HTTP::Tiny->new( %attributes ); |
75 | 75 | |
76 | 76 | =begin original |
77 | 77 | |
78 | 78 | This constructor returns a new HTTP::Tiny object. Valid attributes include: |
79 | 79 | |
80 | 80 | =end original |
81 | 81 | |
82 | 82 | このコンストラクタは新しい HTTP::Tiny オブジェクトを返します。 |
83 | 83 | 有効な属性は以下のものです: |
84 | 84 | |
85 | 85 | =over 4 |
86 | 86 | |
87 | 87 | =item * |
88 | 88 | |
89 | ||
89 | agent | |
90 | 90 | |
91 | 91 | =begin original |
92 | 92 | |
93 | 93 | A user-agent string (defaults to 'HTTP::Tiny/$VERSION') |
94 | 94 | |
95 | 95 | =end original |
96 | 96 | |
97 | 97 | ユーザーエージェント文字列 (デフォルトは 'HTTP::Tiny/$VERSION') |
98 | 98 | |
99 | 99 | =item * |
100 | 100 | |
101 | ||
101 | default_headers | |
102 | 102 | |
103 | 103 | =begin original |
104 | 104 | |
105 | 105 | A hashref of default headers to apply to requests |
106 | 106 | |
107 | 107 | =end original |
108 | 108 | |
109 | 109 | リクエストに適用されるデフォルトのヘッダのハッシュリファレンス |
110 | 110 | |
111 | 111 | =item * |
112 | 112 | |
113 | ||
113 | max_redirect | |
114 | 114 | |
115 | 115 | =begin original |
116 | 116 | |
117 | 117 | Maximum number of redirects allowed (defaults to 5) |
118 | 118 | |
119 | 119 | =end original |
120 | 120 | |
121 | 121 | リダイレクトの最大数 (デフォルトは 5) |
122 | 122 | |
123 | 123 | =item * |
124 | 124 | |
125 | ||
125 | max_size | |
126 | 126 | |
127 | 127 | =begin original |
128 | 128 | |
129 | 129 | Maximum response size (only when not using a data callback). If defined, |
130 | responses larger than this will | |
130 | responses larger than this will die with an error message | |
131 | 131 | |
132 | 132 | =end original |
133 | 133 | |
134 | 134 | 最大レスポンスサイズ (データコールバックを使っていない場合のみ)。 |
135 | 定義されると、これより大きなレスポンスは | |
135 | 定義されると、これより大きなレスポンスはエラーメッセージを出して die します。 | |
136 | 136 | |
137 | 137 | =item * |
138 | 138 | |
139 | ||
139 | proxy | |
140 | 140 | |
141 | 141 | =begin original |
142 | 142 | |
143 | URL of a proxy server to use | |
143 | URL of a proxy server to use. | |
144 | 144 | |
145 | 145 | =end original |
146 | 146 | |
147 | 使うプロキシサーバの URL | |
147 | 使うプロキシサーバの URL。 | |
148 | C<$ENV{http_proxy}>)。 | |
149 | 148 | |
150 | 149 | =item * |
151 | 150 | |
152 | ||
151 | timeout | |
153 | 152 | |
154 | 153 | =begin original |
155 | 154 | |
156 | 155 | Request timeout in seconds (default is 60) |
157 | 156 | |
158 | 157 | =end original |
159 | 158 | |
160 | 159 | リクエストのタイムアウト秒 (デフォルトは 60) |
161 | 160 | |
162 | 161 | =back |
163 | 162 | |
164 | = | |
163 | =head2 get | |
165 | 164 | |
166 | Exceptions from C<max_size>, C<timeout> or other errors will result in a | |
167 | pseudo-HTTP status code of 599 and a reason of "Internal Exception". The | |
168 | content field in the response will contain the text of the exception. | |
169 | ||
170 | =end original | |
171 | ||
172 | C<max_size>, C<timeout> からの例外やその他のエラーは疑似 HTTP ステータスコード | |
173 | 599 と理由 "Internal Exception" を返します。 | |
174 | レスポンスの content フィールドは例外のテキストを含みます。 | |
175 | ||
176 | =head2 get|head|put|post|delete | |
177 | ||
178 | 165 | $response = $http->get($url); |
179 | 166 | $response = $http->get($url, \%options); |
180 | $response = $http->head($url); | |
181 | 167 | |
182 | 168 | =begin original |
183 | 169 | |
184 | ||
170 | Executes a C<GET> request for the given URL. The URL must have unsafe | |
185 | ||
171 | characters escaped and international domain names encoded. Internally, it just | |
186 | ||
172 | calls C<request()> with 'GET' as the method. See C<request()> for valid | |
173 | options and a description of the response. | |
187 | 174 | |
188 | 175 | =end original |
189 | 176 | |
190 | ||
177 | 指定された URL に対して C<GET> リクエストを実行します。 | |
191 | 178 | URL は安全な文字をエスケープされていなければならず、国際ドメイン名は |
192 | 179 | エンコードされていなければなりません。 |
180 | 内部としては、単にメソッドを 'GET' として C<request()> を呼び出します。 | |
193 | 181 | 有効なオプションとレスポンスに関する説明については |
194 | 182 | C<request()> を参照してください。 |
195 | 183 | |
196 | =begin original | |
197 | ||
198 | The C<success> field of the response will be true if the status code is 2XX. | |
199 | ||
200 | =end original | |
201 | ||
202 | レスポンスの C<success> フィールドは、ステータスコードが 2XX の場合に | |
203 | 真になります。 | |
204 | ||
205 | =head2 post_form | |
206 | ||
207 | $response = $http->post_form($url, $form_data); | |
208 | $response = $http->post_form($url, $form_data, \%options); | |
209 | ||
210 | =begin original | |
211 | ||
212 | This method executes a C<POST> request and sends the key/value pairs from a | |
213 | form data hash or array reference to the given URL with a C<content-type> of | |
214 | C<application/x-www-form-urlencoded>. See documentation for the | |
215 | C<www_form_urlencode> method for details on the encoding. | |
216 | ||
217 | =end original | |
218 | ||
219 | This method executes a C<POST> request and sends the key/value pairs from a | |
220 | form data hash or array reference to the given URL with a C<content-type> of | |
221 | C<application/x-www-form-urlencoded>. See documentation for the | |
222 | C<www_form_urlencode> method for details on the encoding. | |
223 | (TBT) | |
224 | ||
225 | =begin original | |
226 | ||
227 | The URL must have unsafe characters escaped and international domain names | |
228 | encoded. See C<request()> for valid options and a description of the response. | |
229 | Any C<content-type> header or content in the options hashref will be ignored. | |
230 | ||
231 | =end original | |
232 | ||
233 | The URL must have unsafe characters escaped and international domain names | |
234 | encoded. See C<request()> for valid options and a description of the response. | |
235 | Any C<content-type> header or content in the options hashref will be ignored. | |
236 | (TBT) | |
237 | ||
238 | =begin original | |
239 | ||
240 | The C<success> field of the response will be true if the status code is 2XX. | |
241 | ||
242 | =end original | |
243 | ||
244 | レスポンスの C<success> フィールドは、ステータスコードが 2XX の場合に | |
245 | 真になります。 | |
246 | ||
247 | 184 | =head2 mirror |
248 | 185 | |
249 | 186 | $response = $http->mirror($url, $file, \%options) |
250 | 187 | if ( $response->{success} ) { |
251 | 188 | print "$file is up to date\n"; |
252 | 189 | } |
253 | 190 | |
254 | 191 | =begin original |
255 | 192 | |
256 | 193 | Executes a C<GET> request for the URL and saves the response body to the file |
257 | 194 | name provided. The URL must have unsafe characters escaped and international |
258 | 195 | domain names encoded. If the file already exists, the request will includes an |
259 | 196 | C<If-Modified-Since> header with the modification timestamp of the file. You |
260 | may specify a different C<If-Modified-Since> header yourself in the C<< | |
197 | may specificy a different C<If-Modified-Since> header yourself in the C<< | |
261 | 198 | $options->{headers} >> hash. |
262 | 199 | |
263 | 200 | =end original |
264 | 201 | |
265 | 202 | URL に対して C<GET> リクエストを実行し、レスポンス本体を指定された |
266 | 203 | ファイル名に保存します。 |
267 | 204 | URL は安全でない文字はエスケープされていなければならず、 |
268 | 205 | 国際ドメイン名はエンコードされていなければなりません。 |
269 | 206 | ファイルが既に存在している場合、リクエストにはそのファイルの変更時刻が |
270 | 207 | C<If-Modified-Since> ヘッダに指定されます。 |
271 | 208 | C<< $options->{headers} >> ハッシュに異なる C<If-Modified-Since> ヘッダを |
272 | 209 | 指定することもできます。 |
273 | 210 | |
274 | 211 | =begin original |
275 | 212 | |
276 | 213 | The C<success> field of the response will be true if the status code is 2XX |
277 | or | |
214 | or 304 (unmodified). | |
278 | 215 | |
279 | 216 | =end original |
280 | 217 | |
281 | 218 | レスポンスの C<success> フィールドは、ステータスコードが 2XX または |
282 | 219 | 304 (unmodified) の場合に真になります。 |
283 | 220 | |
284 | 221 | =begin original |
285 | 222 | |
286 | 223 | If the file was modified and the server response includes a properly |
287 | 224 | formatted C<Last-Modified> header, the file modification time will |
288 | 225 | be updated accordingly. |
289 | 226 | |
290 | 227 | =end original |
291 | 228 | |
292 | 229 | ファイルが変更されていて、サーバレスポンスに適切にフォーマットされている |
293 | 230 | C<Last-Modified> ヘッダが含まれている場合、 |
294 | 231 | ファイル変更時刻はそれに応じて更新されます。 |
295 | 232 | |
296 | 233 | =head2 request |
297 | 234 | |
298 | 235 | $response = $http->request($method, $url); |
299 | 236 | $response = $http->request($method, $url, \%options); |
300 | 237 | |
301 | 238 | =begin original |
302 | 239 | |
303 | 240 | Executes an HTTP request of the given method type ('GET', 'HEAD', 'POST', |
304 | 241 | 'PUT', etc.) on the given URL. The URL must have unsafe characters escaped and |
305 | 242 | international domain names encoded. A hashref of options may be appended to |
306 | 243 | modify the request. |
307 | 244 | |
308 | 245 | =end original |
309 | 246 | |
310 | 247 | 指定された URL に与えられたメソッド型 ('GET', 'HEAD', 'POST', |
311 | 248 | 'PUT' など) で HTTP リクエストを実行します。 |
312 | 249 | URL は安全でない文字はエスケープされていなければならず、 |
313 | 250 | 国際ドメイン名はエンコードされていなければなりません。 |
314 | 251 | オプションのハッシュリファレンスはリクエストを修正するために追加されます。 |
315 | 252 | |
316 | 253 | =begin original |
317 | 254 | |
318 | 255 | Valid options are: |
319 | 256 | |
320 | 257 | =end original |
321 | 258 | |
322 | 259 | 有効なオプションは: |
323 | 260 | |
324 | 261 | =over 4 |
325 | 262 | |
326 | 263 | =item * |
327 | 264 | |
328 | 265 | headers |
329 | 266 | |
330 | 267 | =begin original |
331 | 268 | |
332 | 269 | A hashref containing headers to include with the request. If the value for |
333 | 270 | a header is an array reference, the header will be output multiple times with |
334 | 271 | each value in the array. These headers over-write any default headers. |
335 | 272 | |
336 | 273 | =end original |
337 | 274 | |
338 | 275 | リクエストに含まれるヘッダを含むハッシュリファレンス。 |
339 | 276 | ヘッダの値が配列リファレンスの場合、ヘッダは配列のそれぞれの値で |
340 | 277 | 複数回出力されます。 |
341 | 278 | これらのヘッダはどのようなデフォルトヘッダも上書きします。 |
342 | 279 | |
343 | 280 | =item * |
344 | 281 | |
345 | 282 | content |
346 | 283 | |
347 | 284 | =begin original |
348 | 285 | |
349 | 286 | A scalar to include as the body of the request OR a code reference |
350 | 287 | that will be called iteratively to produce the body of the response |
351 | 288 | |
352 | 289 | =end original |
353 | 290 | |
354 | 291 | リクエストの本体を含むスカラ、またはレスポンスの本体を生成するために |
355 | 292 | 繰り返し呼び出されるコードリファレンス |
356 | 293 | |
357 | 294 | =item * |
358 | 295 | |
359 | 296 | trailer_callback |
360 | 297 | |
361 | 298 | =begin original |
362 | 299 | |
363 | 300 | A code reference that will be called if it exists to provide a hashref |
364 | 301 | of trailing headers (only used with chunked transfer-encoding) |
365 | 302 | |
366 | 303 | =end original |
367 | 304 | |
368 | 305 | (chunked transfer-encoding でのみ使われる) 末尾のヘッダの |
369 | 306 | ハッシュリファレンスを提供するために呼び出されるコードリファレンス |
370 | 307 | |
371 | 308 | =item * |
372 | 309 | |
373 | 310 | data_callback |
374 | 311 | |
375 | 312 | =begin original |
376 | 313 | |
377 | 314 | A code reference that will be called for each chunks of the response |
378 | 315 | body received. |
379 | 316 | |
380 | 317 | =end original |
381 | 318 | |
382 | 319 | レスポンス本体のチャンクを受信する度に呼び出されるコードリファレンス。 |
383 | 320 | |
384 | 321 | =back |
385 | 322 | |
386 | 323 | =begin original |
387 | 324 | |
388 | 325 | If the C<content> option is a code reference, it will be called iteratively |
389 | 326 | to provide the content body of the request. It should return the empty |
390 | 327 | string or undef when the iterator is exhausted. |
391 | 328 | |
392 | 329 | =end original |
393 | 330 | |
394 | 331 | C<content> オプションがコードリファレンスの場合、 |
395 | 332 | リクエストの本体を提供するために呼び出されます。 |
396 | 333 | 反復子を終わる場合、空文字列か undef を返す必要があります。 |
397 | 334 | |
398 | 335 | =begin original |
399 | 336 | |
400 | 337 | If the C<data_callback> option is provided, it will be called iteratively until |
401 | 338 | the entire response body is received. The first argument will be a string |
402 | 339 | containing a chunk of the response body, the second argument will be the |
403 | 340 | in-progress response hash reference, as described below. (This allows |
404 | 341 | customizing the action of the callback based on the C<status> or C<headers> |
405 | 342 | received prior to the content body.) |
406 | 343 | |
407 | 344 | =end original |
408 | 345 | |
409 | 346 | C<data_callback> オプションが指定されると、 |
410 | 347 | レスポンス本体全体が受信されるまで繰り返し呼び出されます。 |
411 | 348 | 最初の引数はレスポンス本体のチャンクを含む文字列で、2 番目の引数は |
412 | 349 | 後述する作業中のレスポンスのハッシュリファレンスです。 |
413 | 350 | (これにより、本体の前に受信した C<status> や C<headers> を基にして |
414 | 351 | コールバックの動作を変えることができます。) |
415 | 352 | |
416 | 353 | =begin original |
417 | 354 | |
418 | 355 | The C<request> method returns a hashref containing the response. The hashref |
419 | 356 | will have the following keys: |
420 | 357 | |
421 | 358 | =end original |
422 | 359 | |
423 | 360 | C<request> メソッドはレスポンスを含むハッシュリファレンスを返します。 |
424 | 361 | ハッシュリファレンスには以下のキーを持ちます: |
425 | 362 | |
426 | 363 | =over 4 |
427 | 364 | |
428 | 365 | =item * |
429 | 366 | |
430 | 367 | success |
431 | 368 | |
432 | 369 | =begin original |
433 | 370 | |
434 | 371 | Boolean indicating whether the operation returned a 2XX status code |
435 | 372 | |
436 | 373 | =end original |
437 | 374 | |
438 | 375 | 操作が 2XX ステータスコードを返したかどうかを示す真偽値 |
439 | 376 | |
440 | 377 | =item * |
441 | 378 | |
442 | 379 | status |
443 | 380 | |
444 | 381 | =begin original |
445 | 382 | |
446 | 383 | The HTTP status code of the response |
447 | 384 | |
448 | 385 | =end original |
449 | 386 | |
450 | 387 | レスポンスの HTTP ステータス |
451 | 388 | |
452 | 389 | =item * |
453 | 390 | |
454 | 391 | reason |
455 | 392 | |
456 | 393 | =begin original |
457 | 394 | |
458 | 395 | The response phrase returned by the server |
459 | 396 | |
460 | 397 | =end original |
461 | 398 | |
462 | 399 | サーバからのレスポンス文字列 |
463 | 400 | |
464 | 401 | =item * |
465 | 402 | |
466 | 403 | content |
467 | 404 | |
468 | 405 | =begin original |
469 | 406 | |
470 | 407 | The body of the response. If the response does not have any content |
471 | 408 | or if a data callback is provided to consume the response body, |
472 | 409 | this will be the empty string |
473 | 410 | |
474 | 411 | =end original |
475 | 412 | |
476 | 413 | レスポンスの本体。 |
477 | 414 | レスポンスに内容がなかったり、レスポンスの本体を処理するための |
478 | 415 | データコールバックが提供された場合、これは空文字列の場合があります。 |
479 | 416 | |
480 | 417 | =item * |
481 | 418 | |
482 | 419 | headers |
483 | 420 | |
484 | 421 | =begin original |
485 | 422 | |
486 | 423 | A hashref of header fields. All header field names will be normalized |
487 | 424 | to be lower case. If a header is repeated, the value will be an arrayref; |
488 | 425 | it will otherwise be a scalar string containing the value |
489 | 426 | |
490 | 427 | =end original |
491 | 428 | |
492 | 429 | ヘッダフィールドのハッシュリファレンス。 |
493 | 430 | 全てのフィールド名は小文字に正規化されます。 |
494 | 431 | ヘッダが繰り返されている場合、値は配列リファレンスになります; |
495 | 432 | それ以外では値を含むスカラ文字列です。 |
496 | 433 | |
497 | 434 | =back |
498 | 435 | |
499 | 436 | =begin original |
500 | 437 | |
501 | 438 | On an exception during the execution of the request, the C<status> field will |
502 | 439 | contain 599, and the C<content> field will contain the text of the exception. |
503 | 440 | |
504 | 441 | =end original |
505 | 442 | |
506 | 443 | リクエストの実行中の例外が起きたの場合、C<status> フィールドには 599 が入り、 |
507 | 444 | C<content> フィールドに例外のテキストが入ります。 |
508 | 445 | |
509 | =head2 www_form_urlencode | |
510 | ||
511 | $params = $http->www_form_urlencode( $data ); | |
512 | $response = $http->get("http://example.com/query?$params"); | |
513 | ||
514 | =begin original | |
515 | ||
516 | This method converts the key/value pairs from a data hash or array reference | |
517 | into a C<x-www-form-urlencoded> string. The keys and values from the data | |
518 | reference will be UTF-8 encoded and escaped per RFC 3986. If a value is an | |
519 | array reference, the key will be repeated with each of the values of the array | |
520 | reference. The key/value pairs in the resulting string will be sorted by key | |
521 | and value. | |
522 | ||
523 | =end original | |
524 | ||
525 | This method converts the key/value pairs from a data hash or array reference | |
526 | into a C<x-www-form-urlencoded> string. The keys and values from the data | |
527 | reference will be UTF-8 encoded and escaped per RFC 3986. If a value is an | |
528 | array reference, the key will be repeated with each of the values of the array | |
529 | reference. The key/value pairs in the resulting string will be sorted by key | |
530 | and value. | |
531 | (TBT) | |
532 | ||
533 | 446 | =for Pod::Coverage agent |
534 | 447 | default_headers |
535 | 448 | max_redirect |
536 | 449 | max_size |
537 | 450 | proxy |
538 | 451 | timeout |
539 | 452 | |
540 | 453 | =head1 LIMITATIONS |
541 | 454 | |
542 | 455 | =begin original |
543 | 456 | |
544 | 457 | HTTP::Tiny is I<conditionally compliant> with the |
545 | 458 | L<HTTP/1.1 specification|http://www.w3.org/Protocols/rfc2616/rfc2616.html>. |
546 | 459 | It attempts to meet all "MUST" requirements of the specification, but does not |
547 | 460 | implement all "SHOULD" requirements. |
548 | 461 | |
549 | 462 | =end original |
550 | 463 | |
551 | 464 | HTTP::Tiny は |
552 | 465 | L<HTTP/1.1 仕様|http://www.w3.org/Protocols/rfc2616/rfc2616.html> に |
553 | 466 | I<部分的に準拠> しています。 |
554 | 467 | 仕様の全ての "MUST" 要求に準拠しようとしていますが、 |
555 | 468 | 全ての "SHOULD" 要求は実装していません。 |
556 | 469 | |
557 | 470 | =begin original |
558 | 471 | |
559 | 472 | Some particular limitations of note include: |
560 | 473 | |
561 | 474 | =end original |
562 | 475 | |
563 | 476 | 注意するべきいくつかの制限は以下のものです: |
564 | 477 | |
565 | 478 | =over |
566 | 479 | |
567 | 480 | =item * |
568 | 481 | |
569 | 482 | =begin original |
570 | 483 | |
571 | 484 | HTTP::Tiny focuses on correct transport. Users are responsible for ensuring |
572 | 485 | that user-defined headers and content are compliant with the HTTP/1.1 |
573 | 486 | specification. |
574 | 487 | |
575 | 488 | =end original |
576 | 489 | |
577 | 490 | HTTP::Tiny は正しい転送に注目しています。 |
578 | 491 | ユーザはユーザ定義のヘッダと内容が HTTP/1.1 仕様に準拠することに |
579 | 492 | 責任があります。 |
580 | 493 | |
581 | 494 | =item * |
582 | 495 | |
583 | 496 | =begin original |
584 | 497 | |
585 | 498 | Users must ensure that URLs are properly escaped for unsafe characters and that |
586 | 499 | international domain names are properly encoded to ASCII. See L<URI::Escape>, |
587 | 500 | L<URI::_punycode> and L<Net::IDN::Encode>. |
588 | 501 | |
589 | 502 | =end original |
590 | 503 | |
591 | 504 | ユーザは、URL に対して安全でない文字がエスケープされ、国際ドメイン名が |
592 | 505 | 適切に ASCII にエンコードされるようにしなければなりません。 |
593 | 506 | L<URI::Escape>, L<URI::_punycode>, L<Net::IDN::Encode> を参照してください。 |
594 | 507 | |
595 | 508 | =item * |
596 | 509 | |
597 | 510 | =begin original |
598 | 511 | |
599 | 512 | Redirection is very strict against the specification. Redirection is only |
600 | 513 | automatic for response codes 301, 302 and 307 if the request method is 'GET' or |
601 | 514 | 'HEAD'. Response code 303 is always converted into a 'GET' redirection, as |
602 | 515 | mandated by the specification. There is no automatic support for status 305 |
603 | 516 | ("Use proxy") redirections. |
604 | 517 | |
605 | 518 | =end original |
606 | 519 | |
607 | 520 | リダイレクトは仕様に対して非常に厳密です。 |
608 | 521 | リダイレクトは、リクエストメソッドが 'GET' または 'HEAD' の場合、 |
609 | 522 | レスポンスコード 301, 302, 307 の場合にのみ自動的に行われます。 |
610 | 523 | レスポンスコード 303 は、仕様で指定されている通り、 |
611 | 524 | 常に 'GET' リダイレクトに変換されます。 |
612 | 525 | ステータス 305 ("Use proxy") リダイレクトの自動対応はしていません。 |
613 | 526 | |
614 | 527 | =item * |
615 | 528 | |
616 | 529 | =begin original |
617 | 530 | |
618 | Persist | |
531 | Persistant connections are not supported. The C<Connection> header will | |
619 | 532 | always be set to C<close>. |
620 | 533 | |
621 | 534 | =end original |
622 | 535 | |
623 | 536 | 永続接続は対応していません。 |
624 | 537 | C<Connection> ヘッダは常に C<close> に設定されています。 |
625 | 538 | |
626 | 539 | =item * |
627 | 540 | |
628 | 541 | =begin original |
629 | 542 | |
630 | 543 | Direct C<https> connections are supported only if L<IO::Socket::SSL> is |
631 | 544 | installed. There is no support for C<https> connections via proxy. |
632 | 545 | Any SSL certificate that matches the host is accepted -- SSL certificates |
633 | 546 | are not verified against certificate authorities. |
634 | 547 | |
635 | 548 | =end original |
636 | 549 | |
637 | 550 | 直接 C<https> 接続は、L<IO::Socket::SSL> が |
638 | 551 | インストールされている場合にのみ対応します。 |
639 | 552 | プロキシ経由の C<https> 接続は対応していません。 |
640 | 553 | ホストにマッチングする全ての SSL 証明書は受け入れられます -- |
641 | 554 | SSL 証明書の認証局への検証は行われません。 |
642 | 555 | |
643 | 556 | =item * |
644 | 557 | |
645 | 558 | =begin original |
646 | 559 | |
647 | 560 | Cookies are not directly supported. Users that set a C<Cookie> header |
648 | 561 | should also set C<max_redirect> to zero to ensure cookies are not |
649 | 562 | inappropriately re-transmitted. |
650 | 563 | |
651 | 564 | =end original |
652 | 565 | |
653 | 566 | クッキーは直接対応していません。 |
654 | 567 | C<Cookie> ヘッダを設定するユーザは、 |
655 | 568 | クッキーが不適切に再送信されないように C<max_redirect> をゼロに |
656 | 569 | 設定するべきです。 |
657 | 570 | |
658 | 571 | =item * |
659 | 572 | |
660 | 573 | =begin original |
661 | 574 | |
662 | ||
575 | Proxy environment variables are not supported. | |
663 | C<http://HOST:PORT/>. If a C<proxy> argument is passed to C<new> (including | |
664 | undef), then the C<http_proxy> environment variable is ignored. | |
665 | 576 | |
666 | 577 | =end original |
667 | 578 | |
668 | ||
579 | プロキシ環境変数は対応していません。 | |
669 | (undef でも) C<proxy> 引数が C<new> に渡されると、 | |
670 | C<http_proxy> 環境変数は無視されます。 | |
671 | 580 | |
672 | 581 | =item * |
673 | 582 | |
674 | 583 | =begin original |
675 | 584 | |
676 | 585 | There is no provision for delaying a request body using an C<Expect> header. |
677 | 586 | Unexpected C<1XX> responses are silently ignored as per the specification. |
678 | 587 | |
679 | 588 | =end original |
680 | 589 | |
681 | 590 | C<Expect> ヘッダを使ったリクエストボディの遅延には対応していません。 |
682 | 591 | 想定外のC<1XX> レスポンスは、仕様通り暗黙に無視されます。 |
683 | 592 | |
684 | 593 | =item * |
685 | 594 | |
686 | 595 | =begin original |
687 | 596 | |
688 | 597 | Only 'chunked' C<Transfer-Encoding> is supported. |
689 | 598 | |
690 | 599 | =end original |
691 | 600 | |
692 | 601 | 'chunked' C<Transfer-Encoding> のみに対応しています。 |
693 | 602 | |
694 | 603 | =item * |
695 | 604 | |
696 | 605 | =begin original |
697 | 606 | |
698 | 607 | There is no support for a Request-URI of '*' for the 'OPTIONS' request. |
699 | 608 | |
700 | 609 | =end original |
701 | 610 | |
702 | 611 | 'OPTIONS' リクエストで Request-URI に '*' を指定するのには対応していません。 |
703 | 612 | |
704 | 613 | =back |
705 | 614 | |
706 | 615 | =head1 SEE ALSO |
707 | 616 | |
708 | 617 | =over 4 |
709 | 618 | |
710 | 619 | =item * |
711 | 620 | |
712 | 621 | L<LWP::UserAgent> |
713 | 622 | |
714 | 623 | =back |
715 | 624 | |
716 | 625 | =for :stopwords cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee diff irc mailto metadata placeholders |
717 | 626 | |
718 | 627 | =head1 SUPPORT |
719 | 628 | |
720 | 629 | (サポート) |
721 | 630 | |
722 | 631 | =head2 Bugs / Feature Requests |
723 | 632 | |
724 | 633 | (バグ / 機能リクエスト) |
725 | 634 | |
726 | 635 | =begin original |
727 | 636 | |
728 | Please report any bugs or feature requests t | |
637 | Please report any bugs or feature requests by email to C<bug-http-tiny at rt.cpan.org>, or through | |
729 | at L<http://rt.cpan.org/Public/Dist/Display.html?Name=HTTP-Tiny>. | |
638 | the web interface at L<http://rt.cpan.org/Public/Dist/Display.html?Name=HTTP-Tiny>. You will be automatically notified of any | |
730 | ||
639 | progress on the request by the system. | |
731 | 640 | |
732 | 641 | =end original |
733 | 642 | |
734 | 643 | バグや機能リクエストについては、 |
644 | C<bug-http-tiny at rt.cpan.org> へのメールか、 | |
735 | 645 | L<http://rt.cpan.org/Public/Dist/Display.html?Name=HTTP-Tiny> の |
736 | イ | |
646 | web インターフェースを使って報告してください。 | |
737 | ||
647 | リクエストになんらかの進展があればシステムによって自動的に通知されます。 | |
738 | 648 | |
739 | 649 | =head2 Source Code |
740 | 650 | |
741 | 651 | =begin original |
742 | 652 | |
743 | 653 | This is open source software. The code repository is available for |
744 | 654 | public review and contribution under the terms of the license. |
745 | 655 | |
746 | 656 | =end original |
747 | 657 | |
748 | 658 | これはオープンソースソフトウェアです。 |
749 | 659 | コードリポジトリはライセンスの元で公式レビューおよび貢献のために利用可能です。 |
750 | 660 | |
751 | L<http | |
661 | L<http://github.com/dagolden/p5-http-tiny/tree> | |
752 | 662 | |
753 | git clone | |
663 | git clone git://github.com/dagolden/p5-http-tiny.git | |
754 | 664 | |
755 | 665 | =head1 AUTHORS |
756 | 666 | |
757 | 667 | =over 4 |
758 | 668 | |
759 | 669 | =item * |
760 | 670 | |
761 | 671 | Christian Hansen <chansen@cpan.org> |
762 | 672 | |
763 | 673 | =item * |
764 | 674 | |
765 | 675 | David Golden <dagolden@cpan.org> |
766 | 676 | |
767 | 677 | =back |
768 | 678 | |
769 | 679 | =head1 COPYRIGHT AND LICENSE |
770 | 680 | |
771 | This software is copyright (c) 201 | |
681 | This software is copyright (c) 2011 by Christian Hansen. | |
772 | 682 | |
773 | 683 | This is free software; you can redistribute it and/or modify it under |
774 | 684 | the same terms as the Perl 5 programming language system itself. |
775 | 685 | |
776 | =cut | |
777 | ||
778 | 686 | =begin meta |
779 | 687 | |
780 | 688 | Translate: SHIRAKATA Kentaro <argrath@ub32.org> |
781 | Status: | |
689 | Status: completed | |
782 | 690 | |
783 | 691 | =end meta |
692 | ||
693 | =cut |