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
37
votes
7 answers

How do I link libcurl to my c++ program in linux?

I need to use libcurl in a piece of software I am writing on my ubuntu machine. I am using Eclipse to write and compile all of the software. When I put the libcurl files in the same folder as the .cpp file, and include the curl.h file in the header,…
Austin Witherspoon
  • 725
  • 2
  • 7
  • 6
34
votes
13 answers

curl: (48) An unknown option was passed in to libcurl

This is really frustrating. I keep getting this error when trying to run a standard curl command: curl --url https://install.meteor.com | sh curl: (48) An unknown option was passed in to libcurl Anyone know how to fix it?
Zaheer
  • 2,794
  • 5
  • 28
  • 33
33
votes
12 answers

How to strip all non alphanumeric characters from a string in c++?

I am writing a piece of software, and It require me to handle data I get from a webpage with libcurl. When I get the data, for some reason it has extra line breaks in it. I need to figure out a way to only allow letters, numbers, and spaces. And…
Austin Witherspoon
  • 725
  • 2
  • 7
  • 6
32
votes
8 answers

Sending POST Requests without waiting for response?

I am writing a simple REST service, which responds to requests from clients. All in PHP. My concern is, that when my server responds to a request, it could end up tying up resources if the client side is too slow in sending back "ok" response. How…
Gotys
  • 1,371
  • 2
  • 13
  • 22
31
votes
7 answers

error: curl: /usr/local/lib/libcurl.so.4: no version information available (required by curl)

Hello i have this error when i run curl from tcl error: curl: /usr/local/lib/libcurl.so.4: no version information available (required by curl) curl --version curl 7.40.0 (x86_64-unknown-linux-gnu) libcurl/7.40.0 OpenSSL/1.0.1f zlib/1.2.8…
user4457475
31
votes
4 answers

NSS: client certificate not found (nickname not specified)?

I'm trying to access a third-party service via PHP curl on a Centos 6 system which comes with curl and libcurl compiled against NSS instead of OpenSSL. This is causing problems for me, every time I try to access the service I get this error NSS:…
Jason
  • 411
  • 1
  • 4
  • 4
29
votes
1 answer

How do you properly install libcurl for use in visual studio 2017?

I am just starting out in c++ and cannot figure out how to add libraries, in particular libcurl. I tried a bunch of tutorials but most were for 2013/10 or didn't work. Can anyone please explain (Preferably in standard/non technical English) how I…
RootInit
  • 401
  • 1
  • 4
  • 4
29
votes
3 answers

cURL for Windows: how can I send multiple line command in a console?

I am learning to use cURL and I need to run this in a console: curl -XGET localhost:9200/library/book/_search?pretty=true -d { "query" : { "query_string" : { "query" : "title:crime" } } } But this is a multi-line command. How can I…
curious1
  • 14,155
  • 37
  • 130
  • 231
27
votes
8 answers

How can I install pyCurl?

I used libcurl with no problems and used pyCurl once in the past. Now i want to set it up on my machine and dev. However i have no idea how to do it. I rather not DL libcirl files and compile that along with pycurl, i want to know the simplest…
user34537
27
votes
7 answers

Using cURL in Android

I would like to use cURL library in my android application in native code (using NDK r5b, the latest). After researching online, it seems the only way to use cURL in android is to build the entire android source tree with curl in it, and somehow…
Nitrex88
  • 2,158
  • 2
  • 21
  • 23
26
votes
4 answers

how to properly reuse a curl handle

I want to properly reuse a curl handle, so that it won't give me errors and function normally. Suppose I have this piece of code: CURL *curl; curl_global_init(CURL_GLOBAL_ALL); curl = curl_easy_init(); curl_easy_setopt(curl,…
user1494517
  • 311
  • 1
  • 3
  • 11
24
votes
4 answers

Setting up curl library path in cmake

I downloaded "curl library" for use with a third party application. When I run the included cmake file, I get the following error. Please help me. I appreciate it: > The C compiler identification is MSVC 18.0.30501.0 > The CXX compiler…
nikk
  • 2,627
  • 5
  • 30
  • 51
23
votes
3 answers

Using LibCURL C++

I've been trying to use LibCURL in C++ for a couple hours now, and it is really getting on my nerves. I have a feeling someone else has had a problem like this before, but I haven't found and posts that have given me a solution. This is what I've…
hetelek
  • 3,776
  • 5
  • 35
  • 56
23
votes
5 answers

How to get HTTP status message in (py)curl?

spending some time studying pycurl and libcurl documentation, i still can't find a (simple) way, how to get HTTP status message (reason-phrase) in pycurl. status code is easy: import pycurl import cStringIO curl = pycurl.Curl() buff =…
mykhal
  • 19,175
  • 11
  • 72
  • 80
23
votes
2 answers

CURLOPT_POST vs. CURLOPT_POSTFIELDS: Is CURLOPT_POST option required?

I'm new to cURL in PHP. I have a question regarding usage of curl options. Consider two script files: test1.php and test2.php both present in root www. I'm using Ubuntu 12.04 LTS. The libcurl version for PHP is 7.22.0. Contents of test1.php
Sanjay Maurya
  • 343
  • 1
  • 3
  • 7