[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/vendor/joomla/http/src/ -> Http.php (summary)

Part of the Joomla Framework Http Package

Copyright: Copyright (C) 2005 - 2021 Open Source Matters, Inc. All rights reserved.
License: GNU General Public License version 2 or later; see LICENSE
File Size: 316 lines (9 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Http:: (13 methods):
  __construct()
  getOption()
  setOption()
  options()
  head()
  get()
  post()
  put()
  delete()
  trace()
  patch()
  sendRequest()
  makeTransportRequest()


Class: Http  - X-Ref

HTTP client class.

__construct($options = [], TransportInterface $transport = null)   X-Ref
Constructor.

param: array|\ArrayAccess  $options    Client options array. If the registry contains any headers.* elements,
param: TransportInterface  $transport  The HTTP transport object.

getOption($key, $default = null)   X-Ref
Get an option from the HTTP client.

param: string  $key      The name of the option to get.
param: mixed   $default  The default value if the option is not set.
return: mixed  The option value.

setOption($key, $value)   X-Ref
Set an option for the HTTP client.

param: string  $key    The name of the option to set.
param: mixed   $value  The option value to set.
return: $this

options($url, array $headers = [], $timeout = null)   X-Ref
Method to send the OPTIONS command to the server.

param: string|UriInterface  $url      The URI to the resource to request.
param: array                $headers  An array of request headers to send with the request.
param: integer              $timeout  Read timeout in seconds.
return: Response

head($url, array $headers = [], $timeout = null)   X-Ref
Method to send the HEAD command to the server.

param: string|UriInterface  $url      The URI to the resource to request.
param: array                $headers  An array of request headers to send with the request.
param: integer              $timeout  Read timeout in seconds.
return: Response

get($url, array $headers = [], $timeout = null)   X-Ref
Method to send the GET command to the server.

param: string|UriInterface  $url      The URI to the resource to request.
param: array                $headers  An array of request headers to send with the request.
param: integer              $timeout  Read timeout in seconds.
return: Response

post($url, $data, array $headers = [], $timeout = null)   X-Ref
Method to send the POST command to the server.

param: string|UriInterface  $url      The URI to the resource to request.
param: mixed                $data     Either an associative array or a string to be sent with the request.
param: array                $headers  An array of request headers to send with the request.
param: integer              $timeout  Read timeout in seconds.
return: Response

put($url, $data, array $headers = [], $timeout = null)   X-Ref
Method to send the PUT command to the server.

param: string|UriInterface  $url      The URI to the resource to request.
param: mixed                $data     Either an associative array or a string to be sent with the request.
param: array                $headers  An array of request headers to send with the request.
param: integer              $timeout  Read timeout in seconds.
return: Response

delete($url, array $headers = [], $timeout = null, $data = null)   X-Ref
Method to send the DELETE command to the server.

param: string|UriInterface  $url      The URI to the resource to request.
param: array                $headers  An array of request headers to send with the request.
param: integer              $timeout  Read timeout in seconds.
param: mixed                $data     Either an associative array or a string to be sent with the request.
return: Response

trace($url, array $headers = [], $timeout = null)   X-Ref
Method to send the TRACE command to the server.

param: string|UriInterface  $url      The URI to the resource to request.
param: array                $headers  An array of request headers to send with the request.
param: integer              $timeout  Read timeout in seconds.
return: Response

patch($url, $data, array $headers = [], $timeout = null)   X-Ref
Method to send the PATCH command to the server.

param: string|UriInterface  $url      The URI to the resource to request.
param: mixed                $data     Either an associative array or a string to be sent with the request.
param: array                $headers  An array of request headers to send with the request.
param: integer              $timeout  Read timeout in seconds.
return: Response

sendRequest(RequestInterface $request)   X-Ref
Sends a PSR-7 request and returns a PSR-7 response.

param: RequestInterface  $request  The PSR-7 request object.
return: ResponseInterface|Response

makeTransportRequest($method, $url, $data = null, array $headers = [], $timeout = null)   X-Ref
Send a request to the server and return a Response object with the response.

param: string               $method   The HTTP method for sending the request.
param: string|UriInterface  $url      The URI to the resource to request.
param: mixed                $data     Either an associative array or a string to be sent with the request.
param: array                $headers  An array of request headers to send with the request.
param: integer              $timeout  Read timeout in seconds.
return: Response



Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer