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
11
votes
5 answers

PHP cURL, POST JSON

I need to POST the following JSON code, but for some reason it is not working. Below is the code that I have. $fieldString = "395609399"; //the curl request processor function processCurlJsonrequest($URL, $fieldString) { //Initiate cURL request and…
Michael
  • 6,377
  • 14
  • 59
  • 91
11
votes
2 answers

decompression gzip data with curl

I added curl_easy_setopt(client, CURLOPT_ENCODING, "gzip"); to my code. I expected curl to cause the server to send compressed data AND to decompress it. Actually i see in HTTP header that the data is compressed (Vary:…
tzviya
  • 537
  • 1
  • 4
  • 14
11
votes
3 answers

C++ libcurl console progress bar

I would like a progress bar to appear in the console window while a file is being downloaded. My code is this: Download file using libcurl in C/C++. How to have a progress bar in libcurl?
user197967
11
votes
3 answers

How do I install curl with ares enabled

I have curl installed on the latest ubuntu via apt-get and that works fine, however I've been reading about the blocking nature of the DNS lookups and discovered that it's slowing down my app. I've done apt-get install libc-ares2 but I'm not sure…
Dom Hodgson
  • 508
  • 2
  • 5
  • 18
11
votes
1 answer

Libcurl: force ipv4 or ipv6

How do I force libcurl to access a server running in dual stack mode over either ipv4 or ipv6? It shouldn't be hard to do using IPs addresses, but I'm looking for something that works with DNS ...
McEnroe
  • 633
  • 3
  • 7
  • 17
11
votes
1 answer

In Xcode, how do I link a dynamic library (libcurl) so that the app also works on older versions of the Mac OS?

I am using libcurl in a Mac project built and compiled on OS 10.7 Lion. I can link to the dynamic library just fine, using either the -lcurl option in Other Linker Flags or by adding the library to my project. Everything works as its supposed…
Philip
  • 655
  • 8
  • 12
10
votes
3 answers

How to install latest libcurl on debian server?

I'm kind of new to these things. I do not know what command line is required to install latest version of libcurl. I followed few articles found on net but i get No acceptable C compiler found in $PATH. I'm on a debian server. Please help.
Vinay Jeurkar
  • 3,054
  • 9
  • 37
  • 56
10
votes
2 answers

Adding self-signed SSL certificate for libcurl

I am using libcurl in my C application to communicate with an HTTPS server that I have set up. I generated a self-signed certificate on that server that I wish to use with curl. I am aware of setting CURLOPT_SSL_VERIFYPEER to 0 to bypass the SSL…
MarkRoadster
  • 101
  • 1
  • 1
  • 4
10
votes
3 answers

How to timeout a libcurl C++ call and/or know when a timeout has happened in the call

I'm trying to download remote html pages with my C++ program, however with some URLs a timeout occurs, but I don't know how to handle this, so the program will just hang indefinatly. virtual void downloadpage(string pageaddress) { CURL *curl; …
Ben Clooney
  • 101
  • 1
  • 1
  • 3
10
votes
1 answer

Adding static libcurl to Code::Blocks IDE

I can't figure out how to properly add a static libcurl library to my Code::Blocks IDE. I want it static because then no .dll files, which are not included in Windows by default, are needed during runtime of my program. I am using this…
Javatar
  • 665
  • 2
  • 10
  • 17
10
votes
2 answers

what does curlopt_binarytranfer exactly mean?

i dont understand what is the difference between CURLOPT_RETURNTRANSFER AND CURLOPT_BINARYTRANSFER i wrote a script to check it
lovesh
  • 5,235
  • 9
  • 62
  • 93
10
votes
3 answers

c++ libcurl json rest

I am trying to download a json file from a REST webpage in C++ with libcurl. The following code works if I go to the webpage but it doesnt download if I try to access the json .... I think it should be an easy fix but I cant find any reference to…
Philip
  • 579
  • 3
  • 8
  • 19
10
votes
3 answers

How to get a Fast .Net Http Request

I need an Http request that I can use in .Net which takes under 100 ms. I'm able to achieve this in my browser so I really don't see why this is such a problem in code. I've tried WinHTTP as well as WebRequest.Create and both of them are over 500ms…
Martin Murphy
  • 1,775
  • 2
  • 16
  • 24
10
votes
1 answer

swift build error on ubuntu 15.10

I am trying to install vapor (https://github.com/vapor/vapor) toolbox on a server which is running Ubuntu 15.10 x64. I am getting this error from the "swift build" command /swift-3.0/usr/bin/swift-build: error while loading shared libraries: …
Rob MacMillian
  • 576
  • 4
  • 14
10
votes
4 answers

Must I use HTTP/2.0 to send Apple Push Notifications? May I use libcurl?

This question, as you may have inferred from the title, is really two questions in one. First Question: Must I use HTTP/2.0 to send Apple Push Notifications? On the APNs Provider API documentation provided by Apple, the opening paragraphs specify:…