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

How do I CURL www.google.com - it keeps redirecting me to .co.uk

I am using CURL to check for the existence of a URL (HEAD request) but when I test it with www.google.com, it redirects me to www.google.co.uk - probably because my server is UK-based. Is there a way you can stop this from happening? I don't want…
J.C
  • 1,409
  • 2
  • 19
  • 32
13
votes
7 answers

JSON requests in C using libcurl

I'm defining a PUT request with a JSON request body using libcurl in C. This how I'm doing it: sprintf(jsonObj, "\"name\" : \"%s\", \"age\" : \"%s\"", name, age); struct curl_slist *headers = NULL; curl_slist_append(headers, "Accept:…
Pedro Baptista Afonso
  • 1,158
  • 2
  • 10
  • 18
12
votes
3 answers

How to make libcurl look in the Mac Keychain for certificates

My code is trying to access an HTTPS server and it has its own certificate. Example, the IP is "10.0.1.101". If I go through Safari and access "http://10.0.1.101", everything's OK. I do a simple curl_easy_perform() for this URL and data can be…
radj
  • 4,360
  • 7
  • 26
  • 41
12
votes
4 answers

Rebuild android code with error “SSL error when connecting to the Jack server. Try 'jack-diagnose”

System: ubuntu 18.04 environment:VirtualBox The first time I compiled the AOSP source code on Ubuntu 18.04, it passed, and the second time I compiled it failed. Here is an error message. [ 10% 538/4980] Ensuring Jack server is installed and…
NVStop
  • 163
  • 1
  • 6
12
votes
1 answer

libcurl — Keep Connection "open" to Upload Multiple Files (FTP)

I need to upload directories to a FTP server on my application, and plan to use libcurl. I see there is no direct way to upload a directory with many files, which makes sense to me. I couldn't, however, find any mention on uploading many files. If I…
sidyll
  • 57,726
  • 14
  • 108
  • 151
12
votes
2 answers

libcurl.so.4: cannot open shared object file: No such file or directory

I am creating binary of s3fs-fuse on Ubuntu 14.04 by following the compilation link. In some systems I get the below error while doing the mount operation on kubernetes pods ---- ------ ---- ---- …
ambikanair
  • 4,004
  • 11
  • 43
  • 83
12
votes
2 answers

Difference between curl/curl.h, libcurl, libcurl4-openssl-dev, libcurl4-nss-dev libraries?

i had the following curl headers, and i still could install the libcurl4 packages mentioned above- kafka@metamorphosis:~$ ll /usr/include/curl/ total 200 drwxr-xr-x 2 root root 4096 Jan 16 13:29 ./ drwxr-xr-x 51 root root 20480 Jan 16 13:29…
erbdex
  • 1,899
  • 3
  • 22
  • 40
12
votes
5 answers

pycurl installation on Windows

I am not able to install pycurl on Windows on Python2.6. Getting following error: C:\Documents and Settings\vijayendra\Desktop\Downloads\pycurl-7.19.0>python setup.py install --curl-dir="C:\Documents and…
Vijayendra Bapte
  • 1,378
  • 3
  • 14
  • 23
12
votes
3 answers

gdb/ddd Program received signal SIGILL

I wrote a very simple program in Linux using c++, which downloads images from some website over http (basically developed a http client request), using cURL libraries. http://curl.haxx.se/libcurl/c/allfuncs.html #define CURL_STATICLIB #include…
Rudy01
  • 1,027
  • 5
  • 18
  • 32
12
votes
2 answers

How to develop http server with libcurl

I m working with libcurl. It's very good (as client) and I used to open a socket to a server and then send my http packets. I'm wondering if it's possible to develop http server with the libcurl. the http server will listen on a given port then when…
MOHAMED
  • 41,599
  • 58
  • 163
  • 268
11
votes
7 answers

Using libcurl on iOS 5 as an alternative to NSURLConnection

Update: NSURLConnection now seems to properly support 100-Continue. In any case, this answer contains a link to the script to build libcurl for iOS/OSX. I'm having a bit of a hard time with NSURLConnection, given that it doesn't support Section…
biasedbit
  • 2,860
  • 4
  • 30
  • 47
11
votes
2 answers

libcurl HTTPS POST data send?

I have application that received data via HTTP POST requests. I'm trying to use libcurl to open a request to this app, send the data and receive the reply back from the app. This is the code I have so far: int main(void) { CURL *curl; …
Mr Aleph
  • 1,887
  • 5
  • 28
  • 44
11
votes
4 answers

Can I use libcurls CURLOPT_WRITEFUNCTION with a C++11 lambda expression?

I tried to use a C++11 lambda expression with CURLOPT_WRITEFUNCTION, but the program crashes at runtime with an access violation. I'm not sure how to look further into this due to lack of C++11 knowledge, but maybe someone else has an idea how to…
Strayer
  • 3,050
  • 3
  • 30
  • 40
11
votes
2 answers

Can the macOS Git client use certificates stored in the user's Keychain?

Our Git server is being changed to require a certificate/private key when accessed by Git clients. Our Windows users are instructed to import the certificate locally and then configure Git to use the schannel backed for SSL as in git config --global…
nwinkler
  • 52,665
  • 21
  • 154
  • 168
11
votes
2 answers

Using curl to submit/retrieve a forms results

I need help in trying to use curl to post data to a page and retrieve the results after the form has been submitted. I created a simple form:
Jason
  • 133
  • 1
  • 1
  • 6