If you're wanting to add a generic cURL module that all other modules that should require this module, it would probably be very useful to add a generic cURL-based implementation of drupal_http_request(), probably named drupal_curl_request(), that most modules should be able to use.

Comments

doq’s picture

Status: Active » Closed (works as designed)

It will provide
* status report about cURL version installed
* alternative cURL implementation when cURL library is not installed.

Dave Reid’s picture

Alternative cURL implementation? How do you plan on accomplishing that? I'm curious. :)

doq’s picture

Using libcurlemu library.
Check out http://drupal.org/node/437066

Dave Reid’s picture

Ah interesting! I'll check it out.

Garrett Albright’s picture

Status: Closed (works as designed) » Active

If I were to implement drupal_curl_request() in this module (and did a decent job of it), would you accept the patch in a fairly timely manner?

I was looking to implement something like that, and I think it would go well in this module instead of creating (yet) another one.

xurizaemon’s picture

Colour me intrigued.

What specific advantages might drupal_curl_request() offer when used in place of drupal_http_request()?

Garrett Albright’s picture

Well, in my case, I needed to use digest authentication, which Drupal's native call doesn't support. cURL also easily supports [S]FTP and other non-HTTP[S] protocols, which can come in handy.

coderintherye’s picture

Could also provide timeout functionality for D6, which drupal_http_request currently does not have, though is being worked on backporting from D7: http://drupal.org/node/156582

mikeytown2’s picture

Status: Active » Closed (duplicate)

D8 has guzzle (cURL wrapper)
D7 effort should be directed here: #64866: Pluggable architecture for drupal_http_request()