WordPress / WordPress/Requests

Missing Available Hook in Doc and Missing Hook Parameter

Open
#220 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Status: triage Type: documentation Type: enhancement
Dominant language
PHP
Stars
3.6k
Forks
500
Avg merge
2d 21h
Merged PRs (30d)
5

Description

There is a hook, 'curl.after_send', located in Requests/Transport/cURL.php on line 165 that is not listed in the Hooks section of the documentation. Also, the parameters array is empty and I believe it should include &$this->handle.

For example in my case I need to have access to the request headers in case of an error so I can log them. I set CURLINFO_HEADER_OUT using curl_setopt in my curl.before_send hook. In order to actually access that header though I still need access to the handle when using the curl.after_send hook.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in Requests/Transport/cURL.php around line 165 and inspect the curl.after_send hook invocation and its empty parameters array. Update the Hooks documentation to list the hook and ensure the handle is available there; done means both the documented hook and requested parameter behavior are present.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend, documentation
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.