[ Index ]

PHP Cross Reference of phpBB-3.2.11-deutsch

title

Body

[close]

/vendor/guzzlehttp/guzzle/src/ -> ClientInterface.php (source)

   1  <?php
   2  namespace GuzzleHttp;
   3  
   4  use GuzzleHttp\Event\HasEmitterInterface;
   5  use GuzzleHttp\Exception\RequestException;
   6  use GuzzleHttp\Message\RequestInterface;
   7  use GuzzleHttp\Message\ResponseInterface;
   8  
   9  /**
  10   * Client interface for sending HTTP requests
  11   */
  12  interface ClientInterface extends HasEmitterInterface
  13  {
  14      const VERSION = '5.3.1';
  15  
  16      /**
  17       * Create and return a new {@see RequestInterface} object.
  18       *
  19       * Use an absolute path to override the base path of the client, or a
  20       * relative path to append to the base path of the client. The URL can
  21       * contain the query string as well. Use an array to provide a URL
  22       * template and additional variables to use in the URL template expansion.
  23       *
  24       * @param string           $method  HTTP method
  25       * @param string|array|Url $url     URL or URI template
  26       * @param array            $options Array of request options to apply.
  27       *
  28       * @return RequestInterface
  29       */
  30      public function createRequest($method, $url = null, array $options = []);
  31  
  32      /**
  33       * Send a GET request
  34       *
  35       * @param string|array|Url $url     URL or URI template
  36       * @param array            $options Array of request options to apply.
  37       *
  38       * @return ResponseInterface
  39       * @throws RequestException When an error is encountered
  40       */
  41      public function get($url = null, $options = []);
  42  
  43      /**
  44       * Send a HEAD request
  45       *
  46       * @param string|array|Url $url     URL or URI template
  47       * @param array            $options Array of request options to apply.
  48       *
  49       * @return ResponseInterface
  50       * @throws RequestException When an error is encountered
  51       */
  52      public function head($url = null, array $options = []);
  53  
  54      /**
  55       * Send a DELETE request
  56       *
  57       * @param string|array|Url $url     URL or URI template
  58       * @param array            $options Array of request options to apply.
  59       *
  60       * @return ResponseInterface
  61       * @throws RequestException When an error is encountered
  62       */
  63      public function delete($url = null, array $options = []);
  64  
  65      /**
  66       * Send a PUT request
  67       *
  68       * @param string|array|Url $url     URL or URI template
  69       * @param array            $options Array of request options to apply.
  70       *
  71       * @return ResponseInterface
  72       * @throws RequestException When an error is encountered
  73       */
  74      public function put($url = null, array $options = []);
  75  
  76      /**
  77       * Send a PATCH request
  78       *
  79       * @param string|array|Url $url     URL or URI template
  80       * @param array            $options Array of request options to apply.
  81       *
  82       * @return ResponseInterface
  83       * @throws RequestException When an error is encountered
  84       */
  85      public function patch($url = null, array $options = []);
  86  
  87      /**
  88       * Send a POST request
  89       *
  90       * @param string|array|Url $url     URL or URI template
  91       * @param array            $options Array of request options to apply.
  92       *
  93       * @return ResponseInterface
  94       * @throws RequestException When an error is encountered
  95       */
  96      public function post($url = null, array $options = []);
  97  
  98      /**
  99       * Send an OPTIONS request
 100       *
 101       * @param string|array|Url $url     URL or URI template
 102       * @param array            $options Array of request options to apply.
 103       *
 104       * @return ResponseInterface
 105       * @throws RequestException When an error is encountered
 106       */
 107      public function options($url = null, array $options = []);
 108  
 109      /**
 110       * Sends a single request
 111       *
 112       * @param RequestInterface $request Request to send
 113       *
 114       * @return \GuzzleHttp\Message\ResponseInterface
 115       * @throws \LogicException When the handler does not populate a response
 116       * @throws RequestException When an error is encountered
 117       */
 118      public function send(RequestInterface $request);
 119  
 120      /**
 121       * Get default request options of the client.
 122       *
 123       * @param string|null $keyOrPath The Path to a particular default request
 124       *     option to retrieve or pass null to retrieve all default request
 125       *     options. The syntax uses "/" to denote a path through nested PHP
 126       *     arrays. For example, "headers/content-type".
 127       *
 128       * @return mixed
 129       */
 130      public function getDefaultOption($keyOrPath = null);
 131  
 132      /**
 133       * Set a default request option on the client so that any request created
 134       * by the client will use the provided default value unless overridden
 135       * explicitly when creating a request.
 136       *
 137       * @param string|null $keyOrPath The Path to a particular configuration
 138       *     value to set. The syntax uses a path notation that allows you to
 139       *     specify nested configuration values (e.g., 'headers/content-type').
 140       * @param mixed $value Default request option value to set
 141       */
 142      public function setDefaultOption($keyOrPath, $value);
 143  
 144      /**
 145       * Get the base URL of the client.
 146       *
 147       * @return string Returns the base URL if present
 148       */
 149      public function getBaseUrl();
 150  }


Generated: Wed Nov 11 20:33:01 2020 Cross-referenced by PHPXref 0.7.1