StreamTransport
Extends \Joomla\Http\AbstractTransport Implements TransportInterfaceHTTP transport class for using PHP streams.
since |
1.7.3 |
---|---|
package |
Joomla CMS |
Methods
getResponse
Method to get a response object from a server response.
getResponse(array headers, string body) : \Joomla\CMS\Http\Response
since |
1.7.3 |
---|---|
throws |
|
Arguments
- headers
array
The response headers as an array.- body
string
The response body as a string.
Response
\Joomla\CMS\Http\Response
isSupported
Method to check if http transport stream available for use
isSupported() : bool
since |
3.0.0 |
---|
Response
bool
true if available else false
request
Send a request to the server and return a Response object with the response.
request(string method, \Joomla\Uri\UriInterface uri, mixed data = null, array headers = [], int timeout = null, string userAgent = null) : \Joomla\CMS\Http\Response
since |
1.7.3 |
---|---|
throws |
|
Arguments
- method
string
The HTTP method for sending the request.- uri
\Joomla\Uri\UriInterface
The URI to the resource to request.- data
mixed
Either an associative array or a string to be sent with the request.- headers
array
An array of request headers to send with the request.- timeout
int
Read timeout in seconds.- userAgent
string
The optional user agent string to send with the request.
Response
\Joomla\CMS\Http\Response