Method: Closes the curl handle if initialized. Do nothing if already closed.
Source Files: includes/lib/stripe-php/lib/HttpClient/CurlClient.php
Method: Resets the curl handle. If the handle is not already initialized, or if persistent connections are disabled, the handle is reinitialized instead.
Method: Sets a callback that is called after each request. The callback will receive the following parameters:
- string $rbody The response body
- integer $rcode The response status code
- \Stripe\Util\CaseInsensitiveArray $rheaders The response headers
- integer $errno The curl error number
- string|null $message The curl error message
- boolean $shouldRetry Whether the request will be retried
- integer $numRetries The number of the retry attempt
Method: Curl permits sending \CURLOPT_HEADERFUNCTION, which is called with lines from the header and \CURLOPT_WRITEFUNCTION, which is called with bytes from the body. You usually want to handle the body differently depending on what was in the header.
Method: Like `executeRequestWithRetries` except: 1. Does not buffer the body of a successful (status code < 300) response into memory -- instead, calls the caller-provided $readBodyChunk with each chunk of incoming data.