Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`**

Expand Down
2 changes: 1 addition & 1 deletion src/Transport/Curl.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down