cURL is a CLI tool for issuing HTTP GET, POST, & PUT request.

learn more… | top users | synonyms

3
votes
2answers
5k views

trying to install curl with homebrew, getting “incompatible library version” for libcurl.4.dylib

I am on OSX 10.9.5. I would like to use a later version of CURL than what is bundled with OSX, but I do not want to remove the OSX binary just in case, so I wanted to opt to install it via homebrew. ...
8
votes
4answers
23k views

How do I get (only) the http status of a site in a shell script?

I figure curl would do the job. I wrote in a script: #!/bin/sh function test { res=`curl -I $1 | grep HTTP/1.1 | awk {'print $2'}` if [ $res -ne 200 ] then echo "Error $res on $1"...
0
votes
0answers
35 views

Curl gets 200 OK, while browser shows 503

I have a bash script: code=$(curl -I -s -S --resolve $host:$port:$ip $link | grep 'HTTP/1.' | awk '{ print $2 }') if [ $code -eq 502 -o $code -eq 503 -o $code -eq 504 ]; then /usr/sbin/service ...
0
votes
1answer
1k views

Curl Command PUT Method

curl -i -X PUT -H 'Content-Length: 1000' http://dfdc:dfdc@xx.xx.xx.xxx:xx/directory/ Above curl doesn't produce any response at Ubuntu shell prompt.
1
vote
0answers
26 views

How can I get a translated string from Google Translate with curl etc?

How can I get a translated string, e.g. English to Spanish, from Google Translate with some command line tools like curl? I looked at the page source but Google Translate doesn't seem to include the ...
1
vote
1answer
26 views

How to provide parameters using text file in curl?

I'm trying to pass parameters in text file and read it in curl command. Like:I added username and password in text file Sample.txt: username:"admin" password:"admin" In curl command, I'm reading ...
0
votes
1answer
1k views

Slow DNS resolve from curl/lynx etc

I have a strange issue with DNS resolving: Root of the problem is that I get curl errors: "Error executing HTTP request: name lookup timed out". Tried to ping some sites, all resolved fine (and fast). ...
4
votes
2answers
5k views

Use curl to send binary file through POST with content-type multipart/form-data;

A post request is made to: http://www.example.com/example/ and the post data is as follows: ------WebKitFormBoundaryB8NNdk2kNdndnnn Content-Disposition: form-data; name="picture[uploaded_data]"; ...
0
votes
1answer
17 views

Unable to download data using curl for loop

I'm trying to download data from the following link export ICTP_DATASITE='http://clima-dods.ictp.it/data/Data/RegCM_Data/EIN15/1990/' These are the codes : for type in "air hgt rhum uwnd vwnd" do ...
8
votes
2answers
44k views

How to fix curl sslv3 alert handshake failure?

I'm trying to curl HTTPS website in the following way: $ curl -v https://thepiratebay.se/ However it fails with the error: * About to connect() to thepiratebay.se port 443 (#0) * Trying 173.245....
0
votes
1answer
107 views

to check the url is live [closed]

I have written a script to check if our three URLs are up else echo down. Now the problem is, even if the URLs are down in that script, I get the message "URLs are up" In the code I have greped 302 ...
2
votes
2answers
4k views

Git pull error libcurl.so.3 not found

I have a php script to git pull from my github repository set up in my webservice hook urls like so: <?php echo shell_exec('~/git/usr/bin/git pull 2>&1'); ?> When I open this script ...
1
vote
1answer
819 views

“dyld: Library not loaded: /usr/local/lib/libcurl.4.dylib” while executing curl with a unprivileged user

My MAC OS is Yosemite 10.10, which has an old version of curl. I have installed Xcode and Xcode command line tools. I run cURL with the "sudo" command as “sudo curl”: sudo curl Password: ...
3
votes
4answers
4k views

Set timeout for web page response with curl

I use a tool to monitor if the web-page is up and running. The tool uses curl command internally to fetch the output. However, when a web-page takes longer time to respond, it results back with a ...
1
vote
0answers
17 views

round robin for curl and dnsmasq

I have setup dnsmasq to the basic configuration, pointing a file with two IP addresses. 10.0.0.1 a.b.c 10.0.0.2 a.b.c When I do nslookup or dig on a.b.c, I see round robin seems to be in effect (...
0
votes
1answer
38 views

OpenWRT: What devices can support cURL on internal storage?

I'm trying to install cURL on my TP-Link TL-WR740N and there's no sufficient space for it. How can I know which TP-Link router or any other OpenWRT supported device has space for cURL? Edit: Is 8 ...
-1
votes
1answer
46 views

Curl to grab the page after complete load

I have a url which takes some time to load completely. But when I use curl to download the link as html, it download the html at the real time before loading page completely I mean complete execution ...
1
vote
1answer
33 views

Cannot Ping, nor Curl, but Nslookup works

On a freshly installed Fedora Workstation running the default Workstation spin which installs Gnome. I'm having problems getting to a web server on the LAN with my browser. The commands curl and ping ...
0
votes
1answer
63 views

Curl a string with whitespaces and characters in it? [duplicate]

I'm trying to create a "simple" script that I'm going to use to create some documentation for Unix/Mac machines. I've successfully received the information I need, but it seems like I can't send it ...
0
votes
3answers
4k views

The best way to add Unix Shell variables to CURL GET request

Let’s say I use curl –X GET command with the following link: “$WEBSITE_URL/ACTION_NAME/ACTION1;id=$ID?Command=TEST&id1=$ID1&id2=$ID2&id3=$ID3” As you can see, there are some $variables ...
4
votes
2answers
34k views

Using curl to access basic auth protected website via proxy (polipo)

I am trying to download a file protected via basic auth: curl "http://User:Pass@example.com/blub/bla.bin" This is working fine. As soon as I tell curl to use my locally installed polipo it fails: ...
1
vote
1answer
39 views

SSL related “undefined reference” on libssh2 and libcurl libs when compiling C on OpenSUSE

I been trying to compile a C software but I'm getting 'undefined reference' over SSL libraries I think. The libraries it mentions are there, actually I compiled them all again: zlib + openssl + ...
6
votes
4answers
2k views

How to tweet using terminal?

I would like to tweet a message using terminal. I tried something like: curl -u 'TwitterUsername':'TwitterPassword' -d status=”Your Message Here” https://twitter.com/statuses/update.xml but seems ...
1
vote
0answers
33 views

cURL: Java website not loading

I can access the configuration page of my device with no problems via web browser (on the GUI). But it doesn't seem to work by using cURL: luis@Fresoncio:~$ curl http://192.168.1.232 <html><...
2
votes
1answer
46 views

Continue interrupted “curl” download

I am downloading a large file over the network. while downloading (say at 40%) the underlying machine get disconnected from network and before the curl quit, the network get connected. But in this ...
50
votes
4answers
27k views

Throttle the download speed of wget or curl while downloading

Is it possible to throttle (limit) the download speed of wget or curl ? Is it possible to change the throttle value while it is downloading ?
3
votes
1answer
35 views

Storing stderr output in a variable without modifing stdout, and doing so repeatedly

there are many "almost duplicate" questions, but none gave me the answer I'm looking for, so bear with me. consider a simple server API, in which you can consume data in iterations, using a "...
1
vote
1answer
36 views

What is the curl equivalent of this wget command?

I'm trying to switch over part of a script from wget to curl. I have this command: wget --output-document=dl.html --quiet --timeout=10 --tries=1 $URL What's the curl equivalent of this?
0
votes
1answer
41 views

Unable to install curl on Debian

I am trying to install Curl on Debian but unfortunately I get the following error: The following packages have unmet dependencies: curl : Depends: libcurl3-gnutls (= 7.47.0-1) but 7.38.0-4+deb8u2 ...
0
votes
0answers
15 views

cURL and Iceweasel disagree about TLS certificate validity, despite same CA

On Debian Jessie 8.4 GNU/Linux, I am experiencing a certificate validation inconsistency between Iceweasel (Debian's derivative of Firefox) and cURL in relation to the URL https://profile.mensa.org.uk/...
2
votes
1answer
67 views

SSL Certificate Problem: unable to get local issuer certificate

I am having small initramfs with static busybox into it. The sole purpose of this initramfs is to download/upload files to the HTTPS server. I have the proper certificate and credentials to do so. ...
2
votes
2answers
5k views

Proper escaping of double quotations for curl post data?

I'm trying to test out a server, by sending it JSON data and reading the response. I need to POST data like {"item":"value with spaces"} but when I use curl I find that it sends the backslashes as ...
17
votes
1answer
21k views

Hide curl output

I'm making a curl request where it displays an html output in the console like this <b>Warning</b>: Cannot modify header information - headers already sent by (output started at /home/...
1
vote
1answer
47 views

BASH Script for logging in to Website

I've tried many solutions provided here in other forums and websites. Like this: #curl -A "Mozilla/4.73 [en] (X11; U; Linux 2.2.15 i686)" \ #--cookie cjar --cookie-jar cjar \ #--data "username=name" ...
0
votes
0answers
37 views

How do I make Web Service call in Shell Script? [closed]

Can I make a web service call in a shell script? For example, below is a web service call through cURL: curl -u graeme:abcd -i -F name=files -F filedata=@employees.csv https://app.example.com/api/...
1
vote
1answer
60 views

How to enable CURL in UNIX server? [closed]

I have to make a web service call through CURL in shell script. For this, CURL should be enabled. Below is my server details: Sun Microsystems Inc. SunOS 5.10 Generic January 2005 below is ...
66
votes
3answers
101k views

Does curl have a timeout?

So far I couldn't find anything really, but is it true that curl doesn't really time out at all? user@host:~# curl http://localhost/testdir/image.jpg I'm asking because I'm redirecting any request ...
3
votes
2answers
95 views

posting data using cURL in a script

I'm trying to write a simple alternative script for uploading files to the transfer.sh service. One of the examples on the website mentions a way of uploading multiple files in a single "session": $ ...
1
vote
1answer
56 views

Pass a list of URLs contained in a file to curl

I have to set ACL on a multiple files. I have downloaded a list of object stored using below commands. C:\Users\Gshrivastava\Downloads\curl_748_0>curl -o urlname.csv -i -k -H "Authorization: ...
0
votes
2answers
64 views

How to get a correct error code from curl when transfer was closed before getting the whole file

I have a bash-script which calls curl using a proxy. Today there is a problem with the download location. Calling curl ends up with: curl: (18) transfer closed with 7512708716 bytes remaining to ...
1
vote
2answers
2k views

download multiple files from sourceforge

Is there any way to download / mirror a folder structure with many files from sourceforge using wget/curl/similar tool? I've seen some examples using rsync or scp but I think that works only for SF ...
0
votes
0answers
393 views

cURL doesn't connect to HTTPS while wget does (NSS error -12286)

I'm getting error NSS error -12286 while downloading a file from HTTPS using curl. I can download the same file without issues using wget so I can exclude any firewall or blacklist issues. Already ...
1
vote
1answer
36 views

unzip/untar files using Curl in ftp server

In the curl command we can delete,rename and move files from a FTP server using Curl like in the command below: curl -v -u username:pwd ftp://host/FileTodelete -Q "DELE FileTodelete" Can we untar ...
3
votes
2answers
2k views

Errors while invoking Web service using `Curl` command from Unix terminal

I have been trying to invoke a web service from my script using the Curl command . I got the script from HERE. My Script : #! /bin/sh ENDPOINT="http://mathertel.de/AJAXEngine/S01_AsyncSamples/...
1
vote
1answer
89 views

Using Named Pipes in Bash created in a C Program

I have a C code that takes a rather large input. At every iteration, it processes a small chunk of it and it should send that processed chunk to S3 using curl. In the end, it will generate a number of ...
0
votes
1answer
147 views

Parse xml returned from curl within a bash script

I've been digging through stackexchange for the past few days and I've found bits and pieces of what I'm trying to accomplish, but I'm unsure how to put it all together... I'm trying to create a ...
3
votes
1answer
198 views

curl outfile variable not working in bash script

Attempting to shorten a bash script that uses curl to fetch multiple API calls takes something like this: curl --user $USER:$PASS https://api.example.com/foo -o 'foo.json' curl --user $USER:$PASS ...
0
votes
2answers
5k views

Failed to connect to dl.google.com port 443: Network is unreachable

$ curl -v https://dl.google.com/dl/cloudsdk/release/install_google_cloud_sdk.bash | bash * STATE: INIT => CONNECT handle 0x2001f130; line 1011 (connection #-5000) * Hostname was NOT found in DNS ...
2
votes
1answer
361 views

Filtering JSON request with JQ and bash scripting

I'm requesting a JSON from Twitch with: curl --silent -H 'Accept: application/vnd.twitchtv.v3+json' -X GET https://api.twitch.tv/kraken/streams/$1 where $1 is the input I send for my function. Now ...
1
vote
2answers
43 views

How to treat remote txt file as stream?

A web service writes its output in a text file. I can fetch that log via: curl -u user:password -k https://log.my-app.com/log.2016-04-04.txt Yet this always only fetches a current "full" file even ...