Changeset 52328 for trunk/src/wp-includes/Requests/Transport.php
- Timestamp:
- 12/06/2021 09:29:00 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/Requests/Transport.php
r52244 r52328 3 3 * Base HTTP transport 4 4 * 5 * @package Requests\Transport 5 * @package Requests 6 * @subpackage Transport 6 7 */ 7 8 namespace WpOrg\Requests;9 8 10 9 /** 11 10 * Base HTTP transport 12 11 * 13 * @package Requests\Transport 12 * @package Requests 13 * @subpackage Transport 14 14 */ 15 interface Transport {15 interface Requests_Transport { 16 16 /** 17 17 * Perform a request … … 20 20 * @param array $headers Associative array of request headers 21 21 * @param string|array $data Data to send either as the POST body, or as parameters in the URL for a GET/HEAD 22 * @param array $options Request options, see {@see \WpOrg\Requests\Requests::response()} for documentation22 * @param array $options Request options, see {@see Requests::response()} for documentation 23 23 * @return string Raw HTTP result 24 24 */ 25 public function request($url, $headers = [], $data = [], $options = []);25 public function request($url, $headers = array(), $data = array(), $options = array()); 26 26 27 27 /** 28 28 * Send multiple requests simultaneously 29 29 * 30 * @param array $requests Request data (array of 'url', 'headers', 'data', 'options') as per {@see \WpOrg\Requests\Transport::request()}31 * @param array $options Global options, see {@see \WpOrg\Requests\Requests::response()} for documentation32 * @return array Array of \WpOrg\Requests\Response objects (may contain \WpOrg\Requests\Exception or string responses as well)30 * @param array $requests Request data (array of 'url', 'headers', 'data', 'options') as per {@see Requests_Transport::request} 31 * @param array $options Global options, see {@see Requests::response()} for documentation 32 * @return array Array of Requests_Response objects (may contain Requests_Exception or string responses as well) 33 33 */ 34 34 public function request_multiple($requests, $options); 35 35 36 36 /** 37 * Self-test whether the transport can be used. 38 * 39 * The available capabilities to test for can be found in {@see \WpOrg\Requests\Capability}. 40 * 41 * @param array<string, bool> $capabilities Optional. Associative array of capabilities to test against, i.e. `['<capability>' => true]`. 42 * @return bool Whether the transport can be used. 37 * Self-test whether the transport can be used 38 * @return bool 43 39 */ 44 public static function test( $capabilities = []);40 public static function test(); 45 41 }
Note: See TracChangeset
for help on using the changeset viewer.