Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
doq CreditAttribution: doq commentedIt will provide
* status report about cURL version installed
* alternative cURL implementation when cURL library is not installed.
Comment #2
Dave ReidAlternative cURL implementation? How do you plan on accomplishing that? I'm curious. :)
Comment #3
doq CreditAttribution: doq commentedUsing libcurlemu library.
Check out http://drupal.org/node/437066
Comment #4
Dave ReidAh interesting! I'll check it out.
Comment #5
Garrett Albright CreditAttribution: Garrett Albright commentedIf 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.
Comment #6
xurizaemonColour me intrigued.
What specific advantages might drupal_curl_request() offer when used in place of drupal_http_request()?
Comment #7
Garrett Albright CreditAttribution: Garrett Albright commentedWell, 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.
Comment #8
coderintherye CreditAttribution: coderintherye commentedCould 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
Comment #9
mikeytown2 CreditAttribution: mikeytown2 commentedD8 has guzzle (cURL wrapper)
D7 effort should be directed here: #64866: Pluggable architecture for drupal_http_request()