[wp-trac] Re: [WordPress Trac] #4779: Proposal for HTTP POST and
REQUEST API
WordPress Trac
wp-trac at lists.automattic.com
Sun May 25 05:43:16 GMT 2008
#4779: Proposal for HTTP POST and REQUEST API
--------------------------------------------------+-------------------------
Reporter: darkdragon | Owner: anonymous
Type: enhancement | Status: new
Priority: normal | Milestone: 2.6
Component: Optimization | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-testing dev-feedback |
--------------------------------------------------+-------------------------
Comment (by jacobsantos):
I have a few suggestions:
1. Add another parameter which adds a few other options, one of which for
what HTTP version to send, however I must admit version 1.0 is a lot
easier to handle.
1. If $headers is not an array, then it will be cast to an array. I would
rather like this to be a string also. If that is the case, then other
handling can be done. There is a function used in WordPress that will
merge both strings or array into another array. Forget the name of it, but
it is used throughout WordPress where string|array are used.
1. The data will not always be URL encoded content, might be XML, so
might need another function which handles data like that for the user to
make it easier. However, I would leave that as an exercise for the
developer. If I send XML, I don't want to have to hack around the current
implementation.
1. Your current fsockopen does not handle redirection correctly and
leaves that as an exercise for the user. This either needs to be noted in
the Documentation or handled within the function. The problem is that most
other HTTP handlers handle this automatically, so it might be problematic
to the user to have to handle it when it will be just for one HTTP
handler. I would do it for the user. You can see my current code which
handles it (kind of nasty code).
1. There is a typo in the documentation
Other than that it seems to be to be pretty awesome. I would rather the
dev team accept the object oriented approach, but I would rather see this
ticket closed.
--
Ticket URL: <http://trac.wordpress.org/ticket/4779#comment:13>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list