[wp-trac] [WordPress Trac] #17251: Determine if any WP_HTTP transport can be used before making the request
WordPress Trac
wp-trac at lists.automattic.com
Thu Apr 28 01:51:55 UTC 2011
#17251: Determine if any WP_HTTP transport can be used before making the request
-------------------------+-----------------------
Reporter: mdawaffe | Owner: dd32
Type: enhancement | Status: assigned
Priority: normal | Milestone: 3.2
Component: HTTP | Version: 3.2
Severity: normal | Resolution:
Keywords: has-patch |
-------------------------+-----------------------
Comment (by mdawaffe):
Replying to [comment:4 dd32]:
> My preferred method would be to keep the "worker" classes of the HTTP
API private.
Part of the "straightforward tweaks" I mentioned would be to wrap things
up in public functions, so this approach works for me.
> My alternate suggestion here is something akin to "supports", ie.
{{{wp_http_supports('ssl'), wp_http_supports('non-blocking'), or
wp_http_supports( array('ssl', 'ssl-signing') );}}}
Since the {{{::test()}}}s are filterable by {{{$url, $args}}}, it would
need to be {{{wp_http_supports( array('ssl', 'ssl-signing'), $url, $args
);}}}
Running {{{wp_http_supports()}}} before {{{wp_remote_request()}}} means
the {{{::test()}}}s would be run twice, which could (in theory) break some
sketchy plugins doing crazy things with the {{{::test()}}} filters.
That aside, it sounds like a good solution to me.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/17251#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list