[ Index ] |
PHP Cross Reference of MediaWiki-1.24.0 |
[Source view] [Print] [Project Stats]
HTTP service client This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
File Size: | 389 lines (14 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
MultiHttpClient:: (6 methods):
__construct()
run()
runMulti()
getCurlHandle()
getCurlMulti()
__destruct()
Class: MultiHttpClient - X-Ref
Class to handle concurrent HTTP requests__construct( array $options ) X-Ref |
param: array $options |
run( array $req, array $opts = array() X-Ref |
Execute an HTTP(S) request This method returns a response map of: - code : HTTP response code or 0 if there was a serious cURL error - reason : HTTP response reason (empty if there was a serious cURL error) - headers : <header name/value associative array> - body : HTTP response body or resource (if "stream" was set) - err : Any cURL error string The map also stores integer-indexed copies of these values. This lets callers do: <code> list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $http->run( $req ); </code> param: array $req HTTP request array param: array $opts return: array Response array for request |
runMulti( array $reqs, array $opts = array() X-Ref |
Execute a set of HTTP(S) requests concurrently The maps are returned by this method with the 'response' field set to a map of: - code : HTTP response code or 0 if there was a serious cURL error - reason : HTTP response reason (empty if there was a serious cURL error) - headers : <header name/value associative array> - body : HTTP response body or resource (if "stream" was set) - err : Any cURL error string The map also stores integer-indexed copies of these values. This lets callers do: <code> list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $req['response']; </code> All headers in the 'headers' field are normalized to use lower case names. This is true for the request headers and the response headers. Integer-indexed method/URL entries will also be changed to use the corresponding string keys. param: array $reqs Map of HTTP request arrays param: array $opts return: array $reqs With response array populated for each |
getCurlHandle( array &$req, array $opts = array() X-Ref |
param: array $req HTTP request map param: array $opts return: resource |
getCurlMulti() X-Ref |
No description |
__destruct() X-Ref |
No description |
Generated: Fri Nov 28 14:03:12 2014 | Cross-referenced by PHPXref 0.7.1 |