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

learn more… | top users | synonyms

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.
2
votes
1answer
25 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 ...
13
votes
1answer
17k 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 ...
1
vote
1answer
42 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" ...
3
votes
2answers
4k 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
0answers
29 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 ...
1
vote
1answer
48 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 ...
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). ...
-1
votes
0answers
35 views

how to pass multiple column value in a command

I have a file oldnewmap.txt. This file has hundreds of records like the following, where column one represents oldnumber and column two represents newnumber. 21382,45678 34567,45663 44245,42455 ...
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 ...
0
votes
3answers
3k 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 ...
62
votes
3answers
95k 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 ...
0
votes
0answers
31 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 ...
3
votes
2answers
70 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
44 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
43 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 ...
4
votes
2answers
33k 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
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
81 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 ...
3
votes
2answers
4k 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. ...
1
vote
1answer
23 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 ...
0
votes
0answers
294 views

CURLE_SSL_CACERT_BADFILE cURL error (77)

I have getting the cURL error CURLE_SSL_CACERT_BADFILE on my Nginx webserver. I found a fix where I add my pem link to my curl.ini file. Before I did this I would get the error on curl ...
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 ...
1
vote
1answer
54 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
82 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
148 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
4k 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
263 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
41 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 ...
2
votes
2answers
6k views

How can I specify that curl (via command line) overwrites a file if it already exists?

I'm using curl in this syntax: curl -o myfile.jpg http://mysite.com/myfile.jpg If I run this command twice, I get two files: myfile.jpg myfile-1.jpg How can I tell CURL that I want it to ...
1
vote
1answer
41 views

Cronjob Create File Every Execute

I can create a cron job for every 5 minutes with following codes: */5 * * * * root bash /etc/cron.d/mongo/5min.sh In the /etc/cron.d/mongo/5min.sh file send request with cURL: #!/bin/sh ...
0
votes
2answers
91 views

Curl and Grep to Parsing Content

I need to parse the output of a curl command: curl --user test:test http://192.168.1.1/security/pkm.html | egrep '@company|config.pkm.password' This returns: <input type="text" ...
1
vote
1answer
65 views

bash scripting - wget or curl file with action based on the status 200 or not

I would like to write a script where I try to download a file with wget (or curl if is really not something that can be done with wget) and do 2 actions if the file exists and it's downloaded ...
1
vote
1answer
36 views

curl load IPs from Text file

I have a list of IPs and want to run a specific curl command on each of them. The command is: curl --user test:test http://192.168.1.1/security/pkm.html | egrep '@company|config.pkm.password' ...
1
vote
1answer
51 views

How to pipe html into lynx?

I am testing some ajax call from the console. I like get rid of the meta-information noise that is html markup and just read the content, hence I like to pipe it into a terminal browser, e.g. lynx. ...
0
votes
2answers
1k views

Curl and grep html text

Is there a way to grep html text from a curl request and output grab the value that is between two html tags? More specifically the input value of a form?
1
vote
0answers
69 views

php curl script working in cli but not on crontab [closed]

I have set the following on crontab */1 * * * * /opt/php-5.3/bin/php -f /var/httpd/appliance/appliance/docs/vip_dashboard_script.php >> /tmp/vip.log 2>&1 the contents of my script. ...
1
vote
3answers
268 views

POST json data with cURL from a while loop - bash shell

I have a JSON output from which I need to extract an ID and Iterate through them and send multiple request to API execute REST API with curl. For example: This is how the JSON output looks like: { ...
0
votes
1answer
22 views

Problems with crontab du to curl

I am trying to send the output of a treesize command to my webserver for further processing. This is not going well, I guess mainly because I am very new to Linux/Debian7 :). Hope you can help me. ...
0
votes
1answer
51 views

How to grep response to figure out how many calls got timed out?

I have a curl command which is calling one of our service so if my service timesout, it returns JSON response like below: [{"results":{"response":null},"error":{"errorCode":1001,"message":"Service ...
1
vote
1answer
32 views

How can I give an argument as an external file to curl with url encode?

I try to request query.wikidata.org using curl. The following command line works perfectly : $ curl -G https://query.wikidata.org/bigdata/namespace/wdq/sparql --data-urlencode query='PREFIX wd: ...
0
votes
1answer
18 views

wget TLSv1 behaves the same as TLSv1_2

I used wireshark to compare curl --tlsv1.0 vs --tlsv1.2 The server handshake obediently uses TLSv1.0 for servers that support it (the point is to check to validate they don't): wget url ...
0
votes
0answers
28 views

Curl ebay multi page ebay api xml to a single text file

I am using the curl -K url.txt > output.txt command to transfer the xml output of an ebay api search to a text file. The search I am performing is multi page, but I am unsure how to export ...
-1
votes
1answer
54 views

WGET encountering 403 when trying to access filter - nginx [closed]

I'm trying to download some images from an asset folder of a site, that folder happens to be forbidden. I've tried various suggestions online including a referrer flag for google.com and setting the ...
-2
votes
3answers
68 views

How to view only contents of a website without the source content (HTML)?

I tried using curl but it displays lot of HTML content (Source). I wanted to know whether it is possible to view contents of the webpage - say a table with some information.
3
votes
1answer
75 views

How do I set up ssh port forwarding and run a curl in a single command?

I want to set up port forwarding with ssh like so: ssh user@10.10.10.10 -L 5656:remoteserver:80 -N and then run a curl command: curl http://localhost:5656/my/endpoint/ I can accomplish this just ...
0
votes
2answers
82 views

curl download multiple files with brace syntax

I am trying to download two files by the following syntax: curl -O http://domain/path/to/{file1,file2} The problem is that only the first file is actually saved locally, and the second was simply ...
1
vote
0answers
49 views

How to avoid curl trying IPv6 name resolution

From a docker container when I try to curl 'another container name', curl first tries to resolve the name to IPv6. This causes few seconds delay because the web server is not reachable over ipv6. I ...
1
vote
1answer
197 views

How to fix curl sslv3 alert handshake failure on Gentoo?

I'm trying open a website with cURL like this: $ curl -vH "Accept: application/json" https://www.rocketleaguereplays.com/api/replays/-1/ The output is: * Trying 104.24.114.83... * Connected to ...