diff --git a/docs/hooks.md b/docs/hooks.md index 922f53257..698db4d82 100644 --- a/docs/hooks.md +++ b/docs/hooks.md @@ -80,7 +80,7 @@ Available Hooks Run events after sending the request, but before interpreting the response. - Parameters: - + Parameters: `cURL resource|CurlHandle &$handle` * **`curl.after_request`** diff --git a/src/Transport/Curl.php b/src/Transport/Curl.php index 8b0a13080..85aa8e1d2 100644 --- a/src/Transport/Curl.php +++ b/src/Transport/Curl.php @@ -204,7 +204,7 @@ public function request($url, $headers = [], $data = [], $options = []) { curl_exec($this->handle); $response = $this->response_data; - $options['hooks']->dispatch('curl.after_send', []); + $options['hooks']->dispatch('curl.after_send', [&$this->handle]); if (curl_errno($this->handle) === CURLE_WRITE_ERROR || curl_errno($this->handle) === CURLE_BAD_CONTENT_ENCODING) { // Reset encoding and try again