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 _buildResponse( array $headers , string $body )
Build a response object
$headers $body Cake\Http\Client\Response_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\Http\Exception\HttpExceptioncontextOptions( )
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 Cake\Http\Client\Response[]send( Cake\Http\Client\Request $request , array $options )
Send a request and get a response back.
Cake\Http\Client\Request $request $options Cake\Http\Client\Response[]Cake\Http\Client\AdapterInterface::send()
© 2005–present 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.8/class-Cake.Http.Client.Adapter.Stream.html