~canonical-sysadmins/wordpress/4.8.1

« back to all changes in this revision

Viewing changes to wp-includes/Requests/Transport.php

  • Committer: Barry Price
  • Date: 2016-08-17 04:50:12 UTC
  • mfrom: (1.1.18 upstream)
  • Revision ID: barry.price@canonical.com-20160817045012-qfui81zhqnqv2ba9
Merge WP4.6 from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
/**
 
3
 * Base HTTP transport
 
4
 *
 
5
 * @package Requests
 
6
 * @subpackage Transport
 
7
 */
 
8
 
 
9
/**
 
10
 * Base HTTP transport
 
11
 *
 
12
 * @package Requests
 
13
 * @subpackage Transport
 
14
 */
 
15
interface Requests_Transport {
 
16
        /**
 
17
         * Perform a request
 
18
         *
 
19
         * @param string $url URL to request
 
20
         * @param array $headers Associative array of request headers
 
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 Requests::response()} for documentation
 
23
         * @return string Raw HTTP result
 
24
         */
 
25
        public function request($url, $headers = array(), $data = array(), $options = array());
 
26
 
 
27
        /**
 
28
         * Send multiple requests simultaneously
 
29
         *
 
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
         */
 
34
        public function request_multiple($requests, $options);
 
35
 
 
36
        /**
 
37
         * Self-test whether the transport can be used
 
38
         * @return bool
 
39
         */
 
40
        public static function test();
 
41
}
 
 
b'\\ No newline at end of file'