[wp-hackers] HTTP API (was: WP 2.7 menu sidebar)

Jacob Santos wordpress at santosj.name
Sat Aug 23 22:12:36 GMT 2008

Cool! I wish more people would test the HTTP API, but I'm thinking 2.7 
is going to come out and people are going to complaining that they can't 
access services. The whole point of the HTTP API was to allow for 
preventing problems with HTTP requests. There is Snoopy, but damn, the 
HTTP API supports more than fsockopen and cURL. However, I'm finding 
that PHP and the extensions don't always work the way you expect or hope.

I believe that some of the administration pages cache the requests, so 
it might be that the error (like WP_Cron) might show up once every hour 
or 12 hours, but who is going to wait around that long?

I believe Dion is going to be working on the Plugin Installer error 
handling, but I think I might also support the other places where the 
HTTP API is used. The way three of the five transports are handled is 
that the errors are silence when WP_DEBUG is turned off. No one has came 
forward to let me know if the other two throw errors or at least ones 
that need to use "@" to get rid of them.

The HTTP API isn't used everywhere, just in four places. WP_Cron, 
WordPress Version checker (every 12 hours), Plugins Version checker 
(done every time plugins.php is visited), and Plugin Installer (some of 
it is cached). I wish to have everything converted to using the HTTP API 
before 2.7 is out, but it will require a lot more testing.

Jacob Santos

Xavier Borderie wrote:
>> I'm not seeing any problems as of now, so either the problem was fixed or
>> I'm not reproducing the problem that well. If it happens again, can you make
>> a ticket with the following: What version of PHP? Whether you have HTTP
>> extension? Whether you have cURL extension? Along with what page it occurred
>> on and what you were doing.
> Will do.
> Haven't received an error since the first time I clicked on one of the
> dynamic pages. Could be that the first request fails, and subsequent
> ones work. I'll try to have the cache deleted to see about this.

More information about the wp-hackers mailing list