- 论坛徽章:
- 1
|
http_get $url, key => value..., $cb->($data, $headers)
Executes an HTTP-GET request. See the http_request function for details on additional parameters and the return value.
The callback will be called with the response body data as first argument (or undef if an error occured), and a hash-ref with response headers (and trailers) as second argument.
All the headers in that hash are lowercased. In addition to the response headers, the "pseudo-headers" (uppercase to avoid clashing with possible response headers) HTTPVersion, Status and Reason contain the three parts of the HTTP Status-Line of the same name. If an error occurs during the body phase of a request, then the original Status and Reason values from the header are available as OrigStatus and OrigReason.
这里写的是让你看 http_request,我看了,是有的,内容太多就不全发了。
如果看了这些反而更加不明白,说明你其实不了解 AnyEvent,
那么我建议你先了解一下这个东西的总体设计原则,
然后再了解它的每个子模块。 |
|