[wp-trac] Re: [WordPress Trac] #4779: Proposal for HTTP POST and
REQUEST API
WordPress Trac
wp-trac at lists.automattic.com
Sun May 25 06:42:43 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):
Replying to [comment:14 DD32]:
> I'm not up to speed with the HTTP 1.1 spec, Content-Encoding:
deflate/chunked/etc just confuse me from a client perspective. It'd be
nice to support gzipped data if possible though i guess.
[[BR]]
I'm not saying that the function handle all of that, I'm saying that we
allow that option for the developer instead of forcing 1.0. If the
developer understands the spec, then they'll probably not want to recreate
another function just to send data and parse it back. If the HTTP 1.1 spec
requires that chunked data be handled within the function, then perhaps it
is better to maintain the 1.0 version.
GZipped can still be handled by the developer. The goal is to just handle
sending and receiving, the user has to determine what to do with the
response after that. It would become a massive function or library if the
function did everything for the developer.
[[BR]]
> >The data will not always be URL encoded content ..[snip].. If I send
XML, I don't want to have to hack around the current implementation.
>
> Thats handled allready, Pass a Array and its converted to a URL encoded
query string. Pass a string and its assumed you know what you want to
pass, so it'll post the exact Serialized data or XML. (Unless i've
stupidly done something i've not noticed?)
[[BR]]
I rechecked and you are correct, it is completely possible. It should
still be noted in the documentation that it is the case for future
reference.
[[BR]]
> > Your current fsockopen does not handle redirection correctly and
leaves that as an exercise for the user. ..[snip]
>
> Point taken, It would be best to follow a certain ammount of redirects
like some of the WP functions do.
[[BR]]
That could be part of the optional last option parameter with the default
at three.
--
Ticket URL: <http://trac.wordpress.org/ticket/4779#comment:15>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list