Questions tagged [libcurl]

Use this tag only for questions related to the multiprotocol internet transfer library, for question related to command line tool please use the specific curl tag

libcurl is a free and easy-to-use client-side URL transfer library, supporting DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET and TFTP. libcurl supports SSL certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP form based upload, proxies, cookies, user+password authentication (Basic, Digest, NTLM, Negotiate, Kerberos), file transfer resume, http proxy tunneling and more!

libcurl is highly portable, it builds and works identically on numerous platforms, including Solaris, NetBSD, FreeBSD, OpenBSD, Darwin, HPUX, IRIX, AIX, Tru64, Linux, UnixWare, HURD, Windows, Amiga, OS/2, BeOs, Mac OS X, Ultrix, QNX, OpenVMS, RISC OS, Novell NetWare, DOS and more...

libcurl is free, thread-safe, IPv6 compatible, feature rich, well supported, fast, thoroughly documented and is already used by many known, big and successful companies and numerous applications.

libcurl provides a few different APIs, the most common and popular one being the easy interface - which does internet transfers synchronously. The documentation for this is for the C API but most language bindings follows that pretty closely which makes the C documentation fairly universal.

See also:

3187 questions
17
votes
2 answers

C++ cannot pass objects of non-POD type

This is my code: #include #include #include #include #include using namespace std; int main () { ifstream llfile; llfile.open("C:/log.txt"); if(!llfile.is_open()){ …
ash-breeze
  • 458
  • 1
  • 5
  • 13
16
votes
5 answers

brew install fails: curl(77) error setting certificate verify

ok, so im running an old Mac 10.6.8 with homebrew. brew doctor reports no errors and i have tried brew prune update etc. Everytime i try to install a package, i get this error: curl: (77) error setting certificate verify locations: CAfile:…
Stone Info Labs
  • 219
  • 1
  • 2
  • 8
16
votes
3 answers

Protocol "https" not supported or disabled in libcurl

Here's my Podfile content: platform :ios, ‘8.0’ use_frameworks! target 'Project-Name' do pod 'Firebase/Core' pod 'Firebase/Messaging' end Same error occurs while adding pod 'GoogleMaps' into Podfile. Error while running pod install --verbose…
Bista
  • 7,869
  • 3
  • 27
  • 55
16
votes
2 answers

Using Curl to get a Https webpage in Windows 7

I just need to fetch an https page, and I'm using curl currently by having the curl.exe application in my Path and calling it with a Perl file. However, then I get the error "* Protocol https not supported or disabled in libcurl". I've been looking…
VolatileRig
  • 2,727
  • 6
  • 32
  • 44
16
votes
5 answers

cURL - put output into variable?

I'm currently using this C code: CURL *curl; CURLcode res; curl = curl_easy_init(); if (curl) { curl_easy_setopt(curl, CURLOPT_URL, "http://my-domain.org/"); res = curl_easy_perform(curl); curl_easy_cleanup(curl); } It prints the…
Mike
  • 161
  • 1
  • 1
  • 3
16
votes
5 answers

How to make SSL peer_verify work on Android?

I've successfully built libcurl-7.36.0 with openssl-1.0.1h on Android. I ran a sample code to test HTTPS connection. The SSL_VERIFYPEER is enabled by default. The certificates path on Android is /system/etc/security/cacerts, so I set CURLOPT_CAPATH…
Robert Chou
  • 211
  • 2
  • 5
16
votes
1 answer

Is curl_easy_perform() synchronous or asynchronous?

I am using curl to send POST and GET requests and I use callback functions to get the replies from these requests. These callback functions are static member functions which in turn call non static member functions (you can't use non static member…
Silver
  • 1,075
  • 3
  • 12
  • 37
15
votes
2 answers

Using libcurl in a multithreaded environment causes VERY slow performance related to DNS lookup

You'll have to pardon the rather large-ish block of code, but I believe this is a near-minimal reproduction of my problem. The problem is not isolated to example.com but persists across many other sites. If I have 4 threads actively making network…
druckermanly
  • 2,694
  • 15
  • 27
15
votes
3 answers

hide curl_easy_perform

How can I hide curl_easy_perform output (in a shell)? This is in regards to a C application.
stdio
  • 435
  • 2
  • 7
  • 18
14
votes
1 answer

Why libcurl needs `CURLOPT_NOSIGNAL` option and what are side effects when it is enabled?

I spent a lot of time to investigate why multithreaded libcurl application crashes on Linux. I saw in forums that I have to use CURLOPT_NOSIGNAL to bypass this problem. Ok, no problems, but are there any information what side effects can it create?…
Vitalii
  • 4,434
  • 4
  • 35
  • 77
14
votes
1 answer

In C, how do you use libcurl to read a HTTP response into a string?

I have homework where I need somehow to compare two HTTP responses. I am writing it on C and I use libcurl to make things easier. I am calling the function that uses libcurl to do a HTTP request and response from another function, and I want to…
empty set
  • 183
  • 1
  • 2
  • 9
13
votes
2 answers

PyCurl installed but not found

I've been trying to install pycurl in a virtualenv with easy_install, and it appears to install correctly: (xxx) $ easy_install pycurl Searching for pycurl Reading http://pypi.python.org/simple/pycurl/ Reading http://pycurl.sourceforge.net/ Reading…
majackson
  • 2,823
  • 6
  • 22
  • 38
13
votes
2 answers

C++ LibCurl - Converting CURLcode into a CString

What would be the easiest way to convert the "res" variable (CURLcode) into a CString? Here's the standard example which compiles fine on my machine but I want to use this in a MFC app and display the result as a MessageBox. Any help is…
kogh
  • 995
  • 4
  • 17
  • 30
13
votes
2 answers

How does one parse HTTP headers with libcurl?

I've been looking around and am quite surprised that there seems to be no means by which one can parse headers generically in libcurl (which seems to be the canonical C library for http these days). The closest thing I've found was a mailing list…
Dustin
  • 89,080
  • 21
  • 111
  • 133
13
votes
1 answer

How to do curl_multi_perform() asynchronously in C++?

I have come to use curl synchronously doing a http request. My question is how can I do it asynchronously? I did some searches which lead me to the documentation of curl_multi_* interface from this question and this example but it didn't solve…
Thanh-Nhon Nguyen
  • 3,402
  • 3
  • 28
  • 41