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
1
vote
0 answers

libcurl and failed downloading

I run multiple downloads with curl curl_multi_perform(multi_handle, &still_running); I need to detect if the connection fails during the downloading. What is the best way to do it. Is it possible/correct to use CURLOPT_TIMEOUT somehow in this…
amplifier
  • 1,793
  • 1
  • 21
  • 55
1
vote
1 answer

Too much memory allocated by curl (memory cached by libcurl)

We are using LibCurl for our SetTop Box applications. It is used in multi-threaded environment and we may open multiple curl handles at the same time but we close it as soon as the download is done. It seems like while opening the curl handle (no…
user1816574
  • 49
  • 1
  • 1
  • 10
1
vote
1 answer

How to read Server Certificate using curl in C/C++

I have a requirement where I need to read the contents of the certificate that the server (say gmail.com) sends to me. I am using Curl in C. Please let me know how to do this.
user3202934
  • 77
  • 2
  • 9
1
vote
2 answers

How to decode an URI with UTF-8 characters in C++

I need to decode an URI in C++. I found several questions about it, but they all fail to deal with UTF-8 encoding and accents (I'm interested in accurately dealing with ASCII characters). Then, I went with a broadly used library like libcurl... but…
g3rv4
  • 19,750
  • 4
  • 36
  • 58
1
vote
1 answer

ogr2ogr libcurl error in Mac OS

I am working to run "ogr2ogr" command in terminal. I got this error message. dyld: Library not loaded: libcurl.4.dylib Referenced from: /usr/local/bin/ogr2ogr Reason: Incompatible library version: ogr2ogr requires version 8.0.0 or later,…
user3001937
  • 2,005
  • 4
  • 19
  • 23
1
vote
1 answer

Trouble with the compilation using libcurl on Windows XP

I downloaded the libcurl curl-7.34.0-devel-mingw32.zip from http://curl.haxx.se/gknw.net/7.34.0/dist-w32/curl-7.34.0-devel-mingw32.zip. I use Eclipse Kepler with MinGW as the toolchain (GCC compiler). I created html.cpp and then test the code from…
Fire
  • 11
  • 1
1
vote
1 answer

CURL does not return proper error code

Here the output is supposed to be anything but 0. Because 0 according to libcurl documentation is a success. http://curl.haxx.se/libcurl/c/libcurl-errors.html curl_easy_setopt(curl_handle, CURLOPT_PROXY, "socks5://127.0.0.1:9050"); And clearly…
HaseebR7
  • 447
  • 4
  • 11
1
vote
1 answer

php-ews-master / response error

I'm trying to use php-ews-master to connect to exchange server, and I'm struggling from a while. With CURL_HTTP_VERSION_1_1 I'm getting the error : Problem (3) in the Chunked-Encoded data. If I modify to CURL_HTTP_VERSION_1_0 I got a response…
tr.attila
  • 11
  • 2
1
vote
1 answer

libcurl HTTPS request and crash under VS 2008

FIXED: Thanks Igor Fix is at bottom. I want to use VS 2008 to send intents to Android. Could not be a simpler request, I thought. Openssl is crashing though and it is curious as to why. Let's start with the code: #include #include…
Mickey Kawick
  • 187
  • 1
  • 12
1
vote
2 answers

C++ How to link LibCurl in Visual Studio 2010

I just downloaded a zip file from LibCurl's official site. In it there are 4 folders: include, bin, lib and samples. I know I need to link my VS2010 project with them. I linked the include folder but I can't find how to link the lib folder. And in…
user3038079
  • 137
  • 1
  • 9
1
vote
1 answer

Wrapping libcurl with std::streambuf for uploads?

I've implemented the read half of the std::streambuf API (i.e., underflow() and xsgetn()) around libcurl so that an ordinary istream can have such a streambuf plugged into it and retrieve the contents from HTTP or FTP servers. It works great. Now…
Paul J. Lucas
  • 6,895
  • 6
  • 44
  • 88
1
vote
1 answer

Difference between CURLOPT_HTTPPOST and CURLOPT_POSTFIELDS

While reading setopt function in cURL I came across CURLOPT_HTTPPOST and CURLOPT_POSTFIELDS, so just wanted to know the difference between the options multipart/formpost(CURLOPT_HTTPPOST) and postfields(CURLOPT_POSTFIELDS) Where we should use…
zer0Id0l
  • 1,374
  • 4
  • 22
  • 36
1
vote
1 answer

SSL Certificate issue: CN entry doesn't match with hostname in URL

I am trying to establish server client communication over SSL using self signed certificates. On server side, I added CN= while creating certificate. My Client is communicating using libCurl with CURLOPT_SSL_VERIFYPEER set to 1 and…
user2078670
  • 43
  • 1
  • 5
1
vote
2 answers

I can't get http code 404 with libcurl

When I send a http request using a wrong server address like 127.0.0.1 as the server address of a URL, the libcurl returns CURLE_OK and get me the http code 0. However, I get http code 404 when I send the same request with IE. Does anyone know how…
ncubrian
  • 421
  • 1
  • 3
  • 14
1
vote
1 answer

ftp over ssl by libcurl in windows

everyone! I'm yanrk, I get a problem: the FTP server force SSL for user login so I code like this: curl_easy_setopt(ftp_handle, CURLOPT_URL, "ftp://192.168.1.xxx:990"); curl_easy_setopt(ftp_handle, CURLOPT_USERNAME,…
1 2 3
99
100