Skip to content

Conversation

@adamziel
Copy link
Collaborator

Introduces a new filter, wp_http_client_request_before_enqueue, to allow modification or rejection of requests before they are enqueued.

The filter may:

  • Change the request, in which case the updated request will be enqueued
  • Return false to reject the request – the original request will bee enqueued and immediately rejected.

Remaining work

Only allow updating the original Request object in the filter. Reject filters that return a new Request instance – the object identity matters as Client consumers may use it to track the data flow.

@adamziel adamziel added enhancement New feature or request HTTP Client labels Sep 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request HTTP Client

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants