You might be interested in the HTTP Parallel Request Library. Here is a link to the readme. It works in cases where drupal_http_request() fails. Just wondering if there is any reason why you don't use drupal_http_request?

Comments

basvredeling’s picture

I've tested replacing curl_exec by a drupal_http_request. The response needs a bit of extra handling and the difference in time between curl_exec an drupal_http_request is minimal. In my tests drupal_http_request is a tiny bit slower on my local machine. Implementing httprl would require quite a big rewrite of the module I believe. Because the requests need to be queued instead of handled right away.

mikeytown2’s picture

httprl queues the requests and executes them all in parallel in the same request. If your looking to queue them up and run them in a separate request, that would require some extra work. I wouldn't call it a big rewrite though because you can create a background process to run the HTTP requests for you. Let me know if your interested. Also checkout http://drupal.org/project/background_process as our goals are the same and are slowing going to merge into one.

basvredeling’s picture

I created a stub sandbox module. You can check it out here: http://drupal.org/sandbox/basvredeling/1677198
The drupal_http_request delegate is pretty functional. The httprl is only functional on a single request. httprl is a loose dependency, it's not required but if enabled takes precedence over both curl (in http_client itself) and drupal_http_request (the aforementioned delegate).

basvredeling’s picture

I forgot to mention that the sandbox module is aimed at Drupal 6. But Drupal 7 shouldn't be very difficult to implement.