Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [curl]

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

1
vote
1answer
2k views

curl, wget do not return anything

I am trying this curl -I zomato.com | head -n 1 and I am not getting any response. % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 ...
0
votes
1answer
113 views

Trying to request a variable before running a curl and read back as integer

echo -e "Enter layoutID: \c" read layoutID echo -e "Enter playlistID: \c" read playlistID echo -e "Enter siteID: \c" read siteID curl -H "Content-Type: application/json" -d '{"LayoutId":$LayoutId........
0
votes
0answers
13 views

curl doesn't measure spent time properly

I need a shell script to get data from the URL and process it. curl "$Url" | jq '(..|select(type == "number")) |= tostring' > "$SCRIPTPATH/../output.json" Curl is used for getting data, all work ...
0
votes
1answer
4k views

Directory Upload to HTTP

Using curl with argument --ftp-create-dirs, I can upload blank directory to FTP/FTPS server. Is there any utility/tool by which I can upload blank/empty directory to HTTP/HTTPS server ?
0
votes
1answer
6k views

Protocol “http” not supported or disabled in libcurl

I am trying to install owncloud, using sudo apt-get owncloud-client. I always get the following errors: Err:1 https://download.opensuse.org/repositories/isv:/ownCloud:/desktop/Ubuntu_16.04 ocqt562-...
1
vote
1answer
5k views

How can I update certificates on my system to fix wget's error: “Unable to establish SSL connection.”?

Sometimes I notice that I am unable to connect via SSL with curl and wget to websites that have certificates that should be valid. One example might be https://squareup.com/ which has a Verisign ...
-2
votes
0answers
18 views

cURL how to ask in multiple URL's a string [on hold]

I've got over 10000 Url's and have to look everytime after the same string. The Url's are all in a file and the Url's where the string was in should also be in a new file.
2
votes
2answers
54 views

Script a Github file download using curl where filename AND path are variable

I needed to script the install of the Digital Ocean CLI " doctl " tool from Github using curl, but there was a problem: The filename varied as it incorporated the version number- so hard-coding it ...
0
votes
2answers
54 views

Display ANSI colours with curl?

I'm currently trying to curl some raw text and have it displayed with interpreted ANSI colours in the Terminal. Currently, when I run curl http://example.com/test.txt (not the actual URL), it simply ...
1
vote
1answer
2k views

How to upload a file using http PUT with httpie?

For some webserver testing, I use curl for file upload like this: $ curl --silent --digest --user user:pass --upload-file filename http://server/dir/ Now I tried to archive the same function but ...
0
votes
1answer
36 views

How do I increment an integer in an URL?

I want to scrape a forum by using an API and curl. API: https://api.hackertarget.com/pagelinks/?q=websitetotest.com Here is the initial link: https://bitcointalk.org/index.php?topic=840124.0 ...
1
vote
1answer
19 views

Unable to save Session ID using curl

With the request: curl -i -u pvserver:XXXXXXX 'http://192.168.2.42/api/login.json' I have this output {"salt":"uTxYWQDc9lWwsuHBRfkuTzJYG5M=","session":{"sessionId":2748768190,"roleId":0},"status":{"...
0
votes
1answer
176 views

Problems with crontab du to curl

I am trying to send the output of a treesize command to my webserver for further processing. Problems with the line that's set in my crontab below: When running the command manually, it works fine, ...
0
votes
1answer
310 views

Fuchsia OS : Magenta Kernel: Installation on ubuntu 16.04

I am on proxy server. Trying to install the magenta kernel using the getting started manual. when I run this command ./scripts/download-toolchain, I get the following error log messages: sudo ./...
1
vote
2answers
3k views

Name Lookup takes a long time

I was using a script that uses curl. Quite often curl fail. The error is name lookup timed out I tried to ping google.com and and other sites. Indeed dns (or whatever do the translation from domain ...
1
vote
3answers
4k views

Curl not found (Glype)

I'm trying to install proxy software called Glype on my server. It continues to tell me that "Glype requires cURL/libcurl". I have the latest version of curl installed. Why might this be happening? ...
2
votes
1answer
339 views

cURL 404 Error - URL encoding with SharePoint URL

I am trying to connect to a SharePoint URL and pull the data in the form of a .json file. My URL looks like this: .../_api/web/lists/GetByTitle('titles list')/items If I give the URL as it is ...
0
votes
0answers
41 views

How can I multithread a for loop to run 1000 times at once?

I have a for loop that is curling the contents of a file, the file contains 2 million web addresses. I woud like to create a for loop that instead of curling the address 1 at a time, curls 1000 at ...
5
votes
5answers
4k views

OSX curl error with unprivileged user dyld: Library not loaded

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: ...
1
vote
1answer
963 views

How do I use wget or CURL in php to grab a snapshot of a web page with an asterick * in its URL? (Wayback Machine archive.org question)

The following web page on the Wayback Machine (archive.org) has an asterick * in its URL: https://web.archive.org/web/*/https://www.nasa.gov/ Neither CURL nor wget will allow me to grab the page. I ...
1
vote
1answer
964 views

Curl parallel download file list

first post sorry if I did some mess here =) Using Ubuntu 14.04lts 64bits server version. I have a list (url.list) with only URLs to download, one per line, that looks like this: http://domain.com/...
0
votes
0answers
35 views

randomly generated words to a form using curl

What I want to achieve is to post a form containing 3 fields (forename, surname and email) to a url, but i want the entries to be randomly generated. I want to generate a random word using; { head /...
0
votes
0answers
29 views

How to receive data from a Webpage and send it back to it in the same connection?

I am trying to fill a form of a webpage with curl and give it some arguments. Dumb enough, it also sends a hidden form in which there is an unique token which has to be sent back to the page, a so ...
0
votes
1answer
37 views

How to run shell command inside awk and redirect to another shell command?

I want to get particular string from the files downloaded using curl and redirect the downloaded file content to another shell program. Here is the code : curl "http://file-list-url" -s | awk 'BEGIN {...
0
votes
1answer
948 views

Session id using curl_7_35

I want to use curl to get the session id. So, please help me if there is any way to get the session id using Curl. Earlier I was using Open SSL to capture the session id. Now, I don't want to use it. ...
0
votes
2answers
46 views

bash remove members Slack from channels using xargs and sleep?

I'd like to be able to remove a batch of people from a "private" Slack channel. Use case: whoops, I just added 137 people to the wrong channel! The Slack Member ID list is obtained from an Airtable ...
1
vote
2answers
82 views

Loop into JSON Array in Bash Script

I make a curl request to an API and get a json return with jq. The result { "errors": [], "metadata": { "clientTransactionId": "", "serverTransactionId": "20190318164551347" }, "...
1
vote
1answer
23 views

Save Request url in Curl output

The command below cats a file full of urls and feeds it into gnu parallel. I would like the output in curlresponse.txt to have also the original request url. How can it be done? cat urls.txt | ...
0
votes
1answer
51 views

Curl hangs after Accept

I have connectivity in both ways from the client to the server as my nc command to port 80 gives [tcp/http] succeeded! in both ways. I'm able to do curl post locally in the server. but couldn't do ...
0
votes
1answer
119 views

Linux Shell - How to remove escape characters generated by JQ when json is read with sed?

I am trying to read a json file and use its output in jq to build another json, combining so said json file and other values, and pass it to CURL I read the file with policies=$( sed 's/\\//g' ...
-1
votes
1answer
167 views

Passing variable to “authorization: bearer” header with Curl and Bash

I've been trying to make this work for a while now, and I just can't see why it's not working. It's just a simple script that's supposed to return either 200 (if it works) or 400 (if it doesn't). The ...
-2
votes
1answer
79 views

How to send binary file URL in the curl command instead passing local path

I am trying to post a binary .apk file which is on s3 bucket to a POST API. Local way which I know is: curl -X POST https://xxx.example.com:443/api/storage/upload -H "Content-Type:application/octet-...
0
votes
2answers
120 views

Getting exit code from curl in bash script

I want to take the output of simple.sh, a script from the internet and check its exit code. I on OSX #!/bin/bash $(curl -s http://127.0.0.1:8000/simple.sh) if [ -z "$?" ]; then echo "Good" ...
0
votes
1answer
40 views

Curl giving different responses on connection timeout

I use Ubuntu 18.04 and I try to curl the unavailable resource like: curl 192.168.11.1 --connect-timeout 10 curl 192.168.11.1 --connect-timeout 35 Why does it sometimes respond with curl: (7) Failed ...
0
votes
0answers
15 views

Error making vince-perf_defconfig

When I want to enter the vince-perf_defconfig file in the terminal, I get an error message like this make vince-perf_defconfig ./scripts/fetch-latest-wireguard.sh: line 7: curl: command not found ./...
0
votes
2answers
953 views

403 http code appears when I go to a certain website

I wrote a PHP script to a particular site using a home computer for debugging. Script worked properly, when I tested it on a home computer. The script has stopped working when I deploy the script on ...
0
votes
1answer
2k views

json.cpp:474:23: fatal error: curl/curl.h: No such file or directory

I am trying to compile ChatScript but I get this error message: json.cpp:474:23: fatal error: curl/curl.h: No such file or directory When I try apt-get install curl it says: curl is already ...
1
vote
1answer
22 views

cURL status bar not displaying

I have done something in a bash script and my cURL command is no longer showing the status bar. I need to save the HTTP response code to a variable, $status: I have: status=$(curl -s -S -o curl.tmp -...
0
votes
1answer
11k views

What does this curl command do?

I'm really new to Unix and I can't figure out what this command does. From what I understand, it sends an HTTP POST request to a website. I don't know exactly what each line is supposed to do. What is ...
-1
votes
1answer
331 views

ftp multiple files to another server via loop

I try to transfer huge amount(578) of file among of 774 files with ftp. I have the file name which should transfer. the file name format is like : TS_20170818_171102_17.csv and it's not a in same ...
0
votes
1answer
1k views

curl with Umlaut causes “JSON parse error: Invalid UTF-8 middle byte 0x22” [duplicate]

I'm running below curl command from the command line (Git Bash on Windows) or as part of a Bash Script. curl -s -X POST -H "Content-Type: application/json" -H "Accept: application/json" -d "{\"...
0
votes
1answer
52 views

running curl with sudo results in a status code 301 (Moved Permanently)

i have a test server running on port 3062, i want to send it HTTP POST data using curl when i run the following command : curl -d '{"k1":"v1","k2","v2"}' -X POST http://localhost:3062 it works fine ...
0
votes
1answer
634 views

How do I download all images from a webpage with wget

I want to download all images from a webpage but when I type: $ wget -nd -r -P images -A "*.jpg, *.jpeg, *.png" "Path/to/url" wget not only downloads images from the webpage I want but it also ...
-1
votes
2answers
44 views

Looping by replacing the values in a file and then doing curl request for 25 times increasing count by 1000

I have a scenario of doing a curl request with payload from a file to my server. Here I need to replace values in my file incrementing values by 1000 and repeating the same for 25 times. I am able to ...
7
votes
3answers
334 views

How do I add a variable to this curl command?

I have a curl command that sends a string of text to the server and I've been trying to figure out how to either have the string of text come from a file or from a bash variable. The command looks ...
4
votes
1answer
1k views

TOR hidden service not always accessible through cURL. Takes multiple tries

When I try to access a hidden service on TOR using cURL, for some reason I'm not getting access to the site 100% of the time. Many times it returns "curl: (7) Can't complete SOCKS5 connection to 0.0.0....
0
votes
1answer
51 views

Troubleshooting: cURL timeouts, Java app doesn't

I'm trying to use curl against a remote server to access a REST API (and right now, just the welcome page...) Currently, I have a Java application that can send REST request on this server. But if I ...
0
votes
2answers
2k 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?
402
votes
3answers
553k views

Does curl have a --no-check-certificate option like wget?

I am trying to make a curl request to one of our local development servers running a dev site with a self-signed SSL cert. I am using curl from the command line. I saw some blog posts mentioning that ...
0
votes
1answer
41 views

why curl can't expand variable inside the loop, but echo can?

I need to include variable inside curl for fname in "assets/*.drx"; do echo $fname curl -F file=@"$fname" "http://someurl.com/" echo $fnamename done Result: assets/...