[wp-trac] [WordPress Trac] #56213: wp_remote_request
WordPress Trac
noreply at wordpress.org
Wed Jul 13 11:19:17 UTC 2022
#56213: wp_remote_request
-------------------------------+------------------------------
Reporter: malthert | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: HTTP API | Version:
Severity: normal | Resolution:
Keywords: reporter-feedback | Focuses:
-------------------------------+------------------------------
Changes (by martin.krcho):
* keywords: => reporter-feedback
Comment:
Hey @malthert, thank you for creating the ticket.
Both `code` and `message` can actually be set to `false`. This is
happening for example in the following part of function
`WP_Http::request()` that is called by `wp_remote_request()`.
https://github.com/WordPress/wordpress-develop/blob/6.0/src/wp-includes
/class-wp-http.php#L424-L435
3rd party developers can also use the filter `http_response` to tweak the
returned array (including the `code` and `message` fields).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56213#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list