cURL is an HTTP client library and command line tool.
Questions tagged [curl]
646 questions
407
votes
15 answers
Displaying a remote SSL certificate details using CLI tools
In Chrome, clicking on the green HTTPS lock icon opens a window with the certificate details:
When I tried the same with cURL, I got only some of the information:
$ curl -vvI https://gnupg.org
* Rebuilt URL to: https://gnupg.org/
* Hostname was NOT…

Adam Matan
- 13,194
- 19
- 55
- 75
123
votes
4 answers
How to test a HTTPS URL with a given IP address
Let's say a website is load-balanced between several servers. I want to run a command to test whether it's working, such as curl DOMAIN.TLD. So, to isolate each IP address, I specify the IP manually. But many websites may be hosted on the server, so…

Martin
- 3,585
- 5
- 20
- 16
95
votes
4 answers
Difference between `curl -I` and `curl -X HEAD`
I was watching the funny server type from http://www.reddit.com with curl -I http://www.reddit.com when I guessed that curl -X HEAD http://www.reddit.com would do the same. But, in fact, it doesn't.
I'm curious about why.
This is what I observe…

chmeee
- 7,370
- 3
- 30
- 43
89
votes
3 answers
Curl: disable certificate verification
I am developing and I need to access https://localhost. I know the certificate will not match. I just want curl to ignore that. Currently it gives me the following error message:
curl: (51) SSL peer certificate or SSH remote key was not OK
Is it…

blueFast
- 4,200
- 13
- 37
- 54
54
votes
4 answers
Is there a built-in command-line tool under Windows like wget/curl?
I come from a Linux/Unix background and I have been wondering if Windows has a binary that can download files from the console.
I would like to automate a certain process and one of my requirements it to not install much software, but use the…

carlspring
- 713
- 1
- 7
- 12
51
votes
4 answers
How do I make cURL use keepalive from the command line?
I'm trying to verify that HTTP persistent connections are being used during communication with a Tomcat webserver I've got running. Currently, I can retrieve a resource on my server from a browser (e.g. Chrome) and verify using netstat that the…

Rob Hruska
- 683
- 1
- 5
- 10
49
votes
7 answers
Default CA Cert Bundle Location
I need to add a .pem cert file to my default CA cert bundle but I don't know where the default CA Cert bundle is kept.
I need to append my new .pem file to this default bundle. I'd rather do that than specify my own location using --capath
cURL…

Slinky
- 1,027
- 3
- 15
- 26
47
votes
7 answers
How to update cURL CA bundle on RedHat?
I am running into issues where the CA bundle that has been bundled with my version of cURL is outdated.
curl: (60) SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate…

Andrew
- 3,453
- 9
- 33
- 36
47
votes
1 answer
Curl POST - 411 Length Required
We have a RestFUL API we build in PHP. If we make the request:
curl -u api-key:api-passphrase https://api.domain.com/v1/product -X POST
We get back:
411 - Length Required
Though if we simply add -d "" onto the request it works and no 411 error. Is…

Justin
- 5,328
- 19
- 64
- 84
35
votes
2 answers
curl (56) Recv failure: Connection reset by peer - when hitting docker container
From an AWS ec2 instance (which runs docker), I am trying to curl my docker container-hosted web service.
Given:
[ec2-user]$ docker ps
CONTAINER ID IMAGE COMMAND …

Kevin Meredith
- 1,269
- 2
- 15
- 21
35
votes
8 answers
How is it possible that I can do a host lookup but not a curl?
Has anyone ever seen this before? Note that this happens not only with google.com, but with every domain I try. It's a wireless connection (WEP), but I'm not sure how that would be relevant:
$ curl -v google.com
# This takes about 60s to return
*…

Daniel Quinn
- 635
- 2
- 9
- 15
33
votes
2 answers
What does `* Mark bundle as not supporting multiuse` mean in my curl trace?
When I do a curl -v to some docker container that I created, I get:
* Mark bundle as not supporting multiuse
What does it mean? Where is it documented?

Martijn Burger
- 445
- 1
- 5
- 9
32
votes
4 answers
How to troubleshoot connectivity when curl gets an *empty response*
I want to know how to proceed in troubleshooting why a curl request to a webserver doesn't work. I'm not looking for help that would be dependent upon my environment, I just want to know how to collect information about exactly what part of the…

chad
- 439
- 1
- 4
- 8
30
votes
1 answer
Return only a HTTP status code from curl command
I want to just get a statusCode from CURL command response.
When I use this command:
curl -I http://uploadserver.ln/1.mp4
I want to just get 200 rather than this long result:
HTTP/1.1 200 OK
Server: nginx/1.14.0 (Ubuntu)
Date: Sun, 01 Jul 2018…

soroush
- 415
- 1
- 5
- 6
29
votes
1 answer
What does "tlsv1 alert unknown ca" mean?
I am trying to do a curl request using a client certificate like so:
curl -E my.pem https://some.site
And I get the following error message:
curl: (35) error:14094418:SSL routines:SSL3_READ_BYTES:tlsv1 alert unknown ca
What does this mean?
Is…

grasevski
- 401
- 1
- 4
- 5