Implements sending Cake\Http\Client\Request via ext/curl.
In addition to the standard options documented in {@link \Cake\Http\Client}, this adapter supports all available curl options. Additional curl options can be set via the curl
option key when making requests or configuring a client.
Convert client options into curl options.
Convert the raw curl response into an Http\Client\Response
Execute the curl handle.
Convert HTTP version number into curl value.
Send a request and get a response back.
buildOptions(Psr\Http\Message\RequestInterface $request, array<string, mixed> $options): array
Convert client options into curl options.
Psr\Http\Message\RequestInterface
$request The request.
array<string, mixed>
$options The client options
array
createResponse(resourceCurlHandle $handle, string $responseData): arrayCake\Http\Client\Response>
Convert the raw curl response into an Http\Client\Response
resourceCurlHandle
$handle Curl handle
string
$responseData string The response data from curl_exec
arrayCake\Http\Client\Response>
exec(resourceCurlHandle $ch): string|bool
Execute the curl handle.
resourceCurlHandle
$ch Curl Resource handle
string|bool
getProtocolVersion(Psr\Http\Message\RequestInterface $request): int
Convert HTTP version number into curl value.
Psr\Http\Message\RequestInterface
$request The request to get a protocol version for.
int
send(Psr\Http\Message\RequestInterface $request, array<string, mixed> $options): arrayCake\Http\Client\Response>
Send a request and get a response back.
Psr\Http\Message\RequestInterface
$request array<string, mixed>
$options arrayCake\Http\Client\Response>
© 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/4.4/class-Cake.Http.Client.Adapter.Curl.html