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
1answer
24 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
26 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
43 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
43 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
15 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
42 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
32 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
90 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
52 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
23 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
12 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
19 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
38 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
261 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
42 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
32 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
45 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
110 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
42 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
44 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
34 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
32 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
1answer
34 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
21 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
84 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
42 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
41 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
24 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
29 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
75 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
107 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
38 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
110 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
66 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
42 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
61 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
80 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
160 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
115 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 ...
11
votes
1answer
2k views

how to make Gnu/Linux trust a certificate that's trusted by Windows out-of-the-box?

There is a server with a broken SSL chain, as reported by this SSL check: I know this is a problem that should be solved on the server itself, but sometimes this is hard to have fixed (I'm not the ...
0
votes
1answer
189 views

bash and curl commands gets errors : bash: /dev/fd/63: No such file or directory and curl: (23) Failed writing body (0 != 8192)

I am trying to install Litespeed in my Debian instance under Google cloud. I try : sudo bash <( curl https://get.litespeed.sh ) my_serial_number I get : bash: /dev/fd/63: No such file or ...
1
vote
0answers
48 views

How to set connect-timeout value of curl more than 120 sec in linux systems?

Tried curl with connect-timeout value more than 120 sec but it is not waiting for specified time. It stops trying to connect after 120 sec eventhough inputted connect-timeout is 180 sec(more than 120 ...
0
votes
2answers
68 views

Make a list of URLs if webpages contain specific text [closed]

I am trying to make a list of URLs of webpages, based on whether the webpages contain the text "XYZ". The URLs are of the form: https://www.website.tld/page.php?var1=???&var2=static ??? is a ...
0
votes
1answer
198 views

How to download https file in AIX without wget and curl? [duplicate]

In an UNIX environment running AIX where I'm a not privileged user (without sudo) if I need to download a file from HTTPS server and there is no wget or curl... How I do it? Is there any replacement ...
1
vote
1answer
268 views

Variable inside a curl Array [duplicate]

How to put the variable "user" in this array. The way it is not it doesn't work sadly. The $user variable should be john.smith for example. I have the following output: curl --header "Authorization: ...
2
votes
1answer
254 views

Alternatives to cURL/wget for remote API calls

I'm on IBM AIX 7.1 where cURL and wget are not available. Also, I'm not in a position to install either. Are there alternatives that would be available that would enable remote API calls using GET/...