Implements sending Cake\Network\Http\Request via php's stream API.
This approach and implementation is partly inspired by Aura.Http
$_connectionErrors
protected array
$_context
protected resource
$_contextOptions
protected array
$_sslContextOptions
protected array
$_stream
protected resource
Local error handler to capture errors triggered during stream connection.
_buildContent( Cake\Network\Http\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\Network\Http\FormData
Cake\Network\Http\Request
$request
$options
_buildContext( Cake\Network\Http\Request $request , array $options )
Build the stream context out of the request object.
Cake\Network\Http\Request
$request
$options
_buildHeaders( Cake\Network\Http\Request $request , array $options )
Build the header context for the request.
Creates cookies & headers.
Cake\Network\Http\Request
$request
$options
_buildOptions( Cake\Network\Http\Request $request , array $options )
Build miscellaneous options for the request.
Cake\Network\Http\Request
$request
$options
_buildSslContext( Cake\Network\Http\Request $request , array $options )
Build SSL options for the request.
Cake\Network\Http\Request
$request
$options
_connectionErrorHandler( integer $code , string $message )
Local error handler to capture errors triggered during stream connection.
$code
$message
_open( string $url )
Open the socket and handle any connection errors.
$url
Cake\Core\Exception\Exception
_send( Cake\Network\Http\Request $request )
Open the stream and send the request.
Cake\Network\Http\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\Network\Http\Request $request , array $options )
Send a request and get a response back.
Cake\Network\Http\Request
$request
$options
© 2005–2016 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.
http://api.cakephp.org/3.2/class-Cake.Network.Http.Adapter.Stream.html