[wp-trac] [WordPress Trac] #24598: Allow custom headers in XML-RPC request
WordPress Trac
noreply at wordpress.org
Tue Jun 18 20:26:14 UTC 2013
#24598: Allow custom headers in XML-RPC request
-------------------------+-----------------------------
Reporter: ericmann | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: XML-RPC | Version: 3.5.1
Severity: normal | Keywords: has-patch
-------------------------+-----------------------------
WordPress avails an override to the default `IXR_Client` object that uses
its own `WP_Http` wrapper for making the request. The wrapper itself is
pluggable, but there are no filters before the call to `wp_remote_post`
that allow developers to intercept and modify the request.
As a result, sending custom headers with the request (like cookies)
requires developers in turn override `IXR_Client` with their own
implementation in order to add the custom data. One example, which
specifically addresses sending cookies with the request, is
https://gist.github.com/ericmann/5808805.
Instead, the built-in `WP_HTTP_IXR_Client` object should pass its header
array through a WordPress filter before building the remote request.
Developers can hook in to this filter to add their own custom headers - be
they cookies, authentication, language, or whatever.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/24598>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list