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.

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 ...
-2
votes
0answers
17 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
52 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
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 ...
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 ...
1
vote
1answer
18 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
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
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
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
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
76 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
118 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' ...
-2
votes
1answer
78 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
116 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" ...
-1
votes
1answer
160 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 ...
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 ./...
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
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 ...
7
votes
3answers
330 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 ...
-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 ...
0
votes
1answer
40 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/...
0
votes
2answers
82 views

curl and grep(?) to grab specifc string - how?

I need to do some testing using curl against our web farm. Each server has some default page with some verbiage on it like this: "Welcome to webappsrv01" "Welcome to webappsrv02" and so forth. How ...
0
votes
1answer
162 views

Why “curl -k https://www.google.com” is not work? [closed]

Environment: macOs + iTerm(has be set https_proxy and http_proxy) + shadowsocks(in auto mode) why curl -k https://www.google.com (not http) has no effect, while https://www.google.com is ok in google ...
1
vote
0answers
80 views

GET via wget or cURL gives a limited response

I'm bumping my head on a simple HTTP GET request. Using a tool like Postman, I'm getting the full and expected response (an over 1 thousand lines xml document, displaying the details of my 60 albums) ...
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
0answers
40 views

Enable SSLV3 request in libcurl 7.52.1

I am using libcurl 7.52.1 to send http request so far I have successfully tried to send TLS request down to TLSV1.0. I need to send SSLV3 requests how can I enable SSLV3 request on my current libcurl ...
0
votes
1answer
36 views

Trying to find better way to read BTC price from specific exchange using Linux [closed]

I would like to use my Linux console to read Bitcoin price from specific exchange using one-liner command. I were able to achieve that using Curl with the following command. curl -sSL https://api....
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 ...
0
votes
1answer
23 views

Recursively following link and running grep on any pages

I'm trying to grep through some logs at the url below to look for a specific username. However I'm getting no results, it just runs without stopping. grepfor="username" urls=("https://tgstation13.org/...
0
votes
1answer
130 views

Why curl > /dev/null and curl -o /dev/null has a large performance difference?

I am using Intel Atom D525, an extremely unpowerful processor for my family router with Debian 9. I tried both curl http://dl.google.com/dl/android/aosp/sailfish-pq2a.190205.003-factory-164a7269.zip &...
0
votes
0answers
68 views

Curl is not supporting SSL (./configure --with-ssl)

I am trying to install curl in opensuse Leap 15.0. I have downloaded the .zip file from this link (version 7.63.0) I am running this command from the curl root directory: ./configure --with-ssl=/usr/...
0
votes
2answers
42 views

How to save a web resource, applying decoding to URL Encoded Characters?

I would like to save this file with this URL "http://pti.regione.sicilia.it/portal/page/portal/PIR_PORTALE/PIR_LaStrutturaRegionale/PIR_AssessoratoEconomia/PIR_DipBilancioTesoro/PIR_Areetematiche/...
-1
votes
1answer
26 views

How to download AWS documentation using linux terminal?

I tried to download AWS documentation using wget and curl commands. I realized and turned off robot and set Mozilla as browser header. But still failed to recursively download the entire documents.
0
votes
1answer
32 views

CURL Not Following Redirect

I am trying to setup a page that redirects to an sh file so I don't have to lookup the actual URL when I need it, but I can't get curl to follow the redirect even when using -L. what am I doing wrong? ...
-8
votes
1answer
83 views

Does HTTP `TRACE` method do the same thing as `curl --trace`?

Does HTTP TRACE method do the same thing as curl --trace? Stephen said at Does `curl -v` show the complete HTTP request including the body?: the TRACE HTTP method affects the server’s behaviour, ...
0
votes
1answer
276 views

What HTTP request and response headers do `curl --cert` and `curl --cacert` read and write?

From https://curl.haxx.se/docs/httpscripting.html In the HTTPS world, you use certificates to validate that you are the one you claim to be, as an addition to normal passwords. Curl supports ...
-3
votes
1answer
46 views

What is the purpose of “use curl --cookie with a file that doesn't exist”?

From https://curl.haxx.se/docs/httpscripting.html Curl's "cookie engine" gets enabled when you use the --cookie option. If you only want curl to understand received cookies, use --cookie with a ...
-1
votes
1answer
351 views

Does `curl -v` show the complete HTTP request including the body?

I thought user=user&password=password will be in the body of the request, but I can't find it. Where is it? Does -v show the complete request including the body? Thanks. $ curl --data "user=user&...
-1
votes
1answer
25 views

Which methods does curl use in these two cases for authentication, GET or POST?

You can opt to either insert the user and password in the URL or you can provide them separately: curl http://user:password@example.org/ or curl -u user:password http://example.org/ Which methods ...
1
vote
1answer
80 views

Protocol SSL is not working with Curl

I am trying to clone Wayland repository from git (for a project) but git clone command is throwing me an error. I installed curl (from here). After cloning make && make install. Earlier I had ...
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 ...
1
vote
1answer
64 views

Are these commands materially, or only semantically different?

In a shell script that's using curl to fetch a script, then executing it, are these two approaches materially different? curl http://address-to-some-script/dosomething.sh | sudo tee /usr/bin/...
0
votes
0answers
18 views

problem installing curl [duplicate]

I am currently running kali linux(light, 64 bit) on a multiboot usb using YUMI and i'm trying to install curl but it needs additional storage, what should you suggest?
0
votes
2answers
56 views

Working with grep

I am try to fetch all the links from materialdesignicons.com! I do the following: curl -X GET https://materialdesignicons.com | grep -i "<link href=" | grep -v "<link href=" But it doesn't ...
2
votes
0answers
86 views

PHP Curl when accessing SSL slows down connection. How to correct?

After migrating to a new server, our scripts slowed down dramatically. Some troubleshooting showed that the slowdown occurred during Curl connections as the server was trying to load the SSL cert. ...
1
vote
1answer
116 views

bash curl post request set timeout

I make a post request from url like this curl -s -X POST http://site.com -d "data:data" The thing is that I want to set a timeout for the url I am sending the post request to. I tried -m 5, but ...
1
vote
1answer
221 views

curl doesn't work in bash loop

I run this command in a single bash file to post the data to a url and get the response curl -s -X POST $url -d "username=username" It outputs the response body. All good But I want to automate ...
2
votes
1answer
187 views

Capture http token with tcpdump

My server runs curl commands to some API using a token. For example: curl --header "Private-Token: aaaaaaaaaaaaaa" http://mysite.example.com/api/v4/any Can i capture with tcpdump all of the requests ...