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