Implements sending Cake\Http\Client\Request via php's stream API.
This approach and implementation is partly inspired by Aura.Http
$_connectionErrors
protected array
$_context
protected resource|null
$_contextOptions
protected array
$_sslContextOptions
protected array
$_stream
protected resource|null
_buildContent( Cake\Http\Client\Request $request , array $options )
Builds the request content based on the request object.
If the $request->body() is a string, it will be used as is. Array data will be processed with Cake\Http\Client\FormData
Cake\Http\Client\Request
$request
$options
_buildContext( Cake\Http\Client\Request $request , array $options )
Build the stream context out of the request object.
Cake\Http\Client\Request
$request
$options
_buildHeaders( Cake\Http\Client\Request $request , array $options )
Build the header context for the request.
Creates cookies & headers.
Cake\Http\Client\Request
$request
$options
_buildOptions( Cake\Http\Client\Request $request , array $options )
Build miscellaneous options for the request.
Cake\Http\Client\Request
$request
$options
_buildSslContext( Cake\Http\Client\Request $request , array $options )
Build SSL options for the request.
Cake\Http\Client\Request
$request
$options
_open( string $url )
Open the socket and handle any connection errors.
$url
Cake\Core\Exception\Exception
_send( Cake\Http\Client\Request $request )
Open the stream and send the request.
Cake\Http\Client\Request
$request
Cake\Core\Exception\Exception
contextOptions( )
Get the context options
Useful for debugging and testing context creation.
createResponses( array $headers , string $content )
Create the response list based on the headers & content
Creates one or many response objects based on the number of redirects that occurred.
$headers
$content
send( Cake\Http\Client\Request $request , array $options )
Send a request and get a response back.
Cake\Http\Client\Request
$request
$options
© 2005–2017 The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/3.4/class-Cake.Http.Client.Adapter.Stream.html