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
22 views

trim using sed to get the exact value from curl

I'm getting this string data from curl command {"password": [["passwordreal", "2035/01/01 00:00"]], "user": "user1", "address": "kobebkokoko.net"} How do I get passwordreal using sed? Example, ...
3
votes
3answers
12k views

How to trust self-signed certificate in cURL command line?

I've created a self-signed certificate for foo.localhost using a Let's Encrypt recommendation using this Makefile: include ../.env configuration = csr.cnf certificate = self-signed.crt key = self-...
-1
votes
1answer
27 views

How to grep for multiple text lines in between unknown and changing html code

Here is my function. ph_relwords () { search="" echo "related words: $@" for term in $@; do search="$search+$term" done wget -q -x "https://www.pornhub.com/video/search?...
2
votes
1answer
1k views

Curl NSS / SSL error after update

I use a custom internal authentication server. With the last round of updates it started having issues, apparently due to a change in the ciphers. This is on a CentOS6 box, fully updated. curl https:...
0
votes
0answers
12 views

Problem with the limit of requests api youtube v3 search

I execute the following command: curl -G https://www.googleapis.com/youtube/v3/search \ -d part="id" \ -d q="es-por-ti-juanes" \ -d maxResults="1" \ -d key="..........." \ -d type="video" \ -d ...
0
votes
2answers
1k views

Debian 9.4: cannot install php7.2-curl

Trying to install php7.2-curl library from a well-known repository deb.sury.org on Debian 9.4. But it gives the error: The following packages have unmet dependencies: php7.2-curl : Depends: libcurl4 ...
-3
votes
0answers
22 views

Curl problem in Python [migrated]

I'm using python 2.7 and I need a python script like following. The problem is waiting file download everytime for result if curl time condition is True. I want to get result without waiting file ...
0
votes
2answers
48 views

Get web page complete data

I'm using busybox tools and I want to take all http links in a web page. I save an example link page by using curl or wget. However, it saves the page as html. How to do it with curl or wget commands? ...
3
votes
3answers
2k views

Sanitize Json for sending with Curl

I have to send a POST request to some service with json payload, and it includes some user input. That input variable needs to be Json-encoded to prevent injection attacks. Code example that ...
0
votes
1answer
37 views

RH 7.5 Linux using curl with sftp to pull multiple files ending in a particular file extension

I am in a Red Hat Linux 7.5 environment. I am trying to write a curl script to pull/receive any file from a folder that ends with a particular file extension. Previously, I have written a script to ...
-1
votes
0answers
22 views

Uninstalled version that I cannot reinstall

I'm running nextcloudPlus on a raspberry pi 3 B. I decided to try some stuff out and I uninstalled curl and a bit later reinstalled it. This is the apt history log: Start-Date: 2019-06-04 18:04:26 ...
424
votes
3answers
577k 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 ...
-1
votes
1answer
12 views

how to download ebi fastq link via command line using wget/curl

I have loads of data (fastq) to download from ENA database. Example: ERS076383 ERS012262 ERS160574 ERS349280 etc Link to download via browser: https://www.ebi.ac.uk/ena/data/warehouse/filereport?...
240
votes
3answers
125k views

What is the difference between curl and wget?

I am keen to know the difference between curl and wget. Both are used to get files and documents but what the key difference between them. Why are there two different programs?
0
votes
2answers
2k views

Curl not returning response

I have a scenario where I was using curl --noproxy "*" https://.. to get the response but suddenly when I use it now it doesn't return me the response instead it says curl: (60) Peer certificate ...
1
vote
1answer
90 views

Bash script curl input variable from command line

I would like to be able to pass in what environment when script is run. Like script.sh dev ($dev would populate appropriate URL in curl command in script). Maybe even print the environment as options ...
0
votes
0answers
18 views

Binary Output from Curl [duplicate]

When I executed the command: curl https://piwik.openstreetmap.org/piwik.php?idsite=1 I received a warning that binary output can mess up my terminal, which, yes it did having ignored the warning, so ...
0
votes
2answers
7k views

What is the meaning of “curl -k -i -X” in Linux?

I have read the man pages of Curl, but I can't understand what those parameters (k, i and X) mean. I see it used in a REST API call, but can someone please explain what those three parameters do? It's ...
0
votes
4answers
48 views

how to capture IP address from info

by the following api we can get the info about master1/2 machines curl -sH "X-Requested-By: ambari" -u "admin"":""admin" -i http://192.23.39.2:8080/api/v1/hosts?fields=Hosts/host_name,Hosts/ip | ...
0
votes
1answer
2k views

how to put variable in CURL header using shell script?

I want to call an API using shellscript but I m not able to put header properly...whats going wrong in my script... thanks in advance. shell script : #!/bin/bash curl -H "Authorization: Basic ...
1
vote
0answers
61 views

Curl download speed restricted when down/uploading from stdin/stdout

I'm running 2 curl commands where one downloads all the data into stdout/in until the stack is filled and another uploading whatever is in it out but it seems like the speed is restricted. For the ...
0
votes
1answer
18 views

asus ac68 merlin curl ignore http_proxy

asus ac68 is a router. I have installed the latest firmware(merlin) 384.11. curl -V curl 7.64.1 (arm-unknown-linux-gnu) libcurl/7.64.1 OpenSSL/1.0.2r zlib/1.2.5 Release-Date: 2019-03-27 Protocols: ...
31
votes
8answers
147k views

Health check of web page using curl

I'd like to do a health check of a service by calling a specific url on it. Feels like the simplest solution would be to use cron to do the check every minute or so. In case of errors, cron sends me ...
0
votes
0answers
17 views

Automatically upload directory to dropbox in no time (whenever any changes done to that directory

I installed the following Script on my CentOS 7 terminal access. I'll use this script to upload specific directory from the Linux to dropbox. using the following command i can upload the directory ...
-2
votes
1answer
712 views

Shell script curl limit the try time for page not found

I found following code to check web url. if curl --output /dev/null --silent --head --fail "$url"; then echo "URL exists: $url" else echo "URL does not exist: $url" fi Here if the page not ...
1
vote
2answers
81 views

php curl not getting installed on Debian 8 [duplicate]

I am using linux debian 8. I have webmin/virtualmin installed and 1 domain is running over the server. Php version is 7.1. But, i can not run curl on my server. i tried to install curl but it throws ...
1
vote
0answers
16 views

After setcap on executable, curl_easy_perform throws out of memory error

I've cross compiled an executable to run on Debian Stretch that requires a specific version of cURL (greater than 7.56) to run, and needs specific capabilities during execution. So on the executable ...
2
votes
1answer
3k views

Curl 7.27: [ANY]_PROXY set; curl does not resolve the hostname via proxy

I'm using curl with a Socks proxy. The proxy is configured via ANY_PROXY="socks5://NNN.NNN.NNN.NNN.PPPP" I observed that curl resolves the hostname locally, not via the proxy. When requesting a URL ...
1
vote
1answer
17 views

Terminology used in the manual for the curl package

An extract from the manual for the curl package reads: Using --anyauth is not recommended if you are doing uploads from stdin, since it may require the data to be sent twice and the client must be ...
0
votes
2answers
34 views

Phantom binary installed with curl

I upgraded binary youtube-dl following this instruction. locate seems to find it, not ls, and it cannot be invoked. What is happening? /usr/bin $ sudo apt-get remove youtube-dl /usr/bin $ sudo curl -...
8
votes
3answers
20k views

Setting jq output to a Bash Variable

I'm using curl to get JSON back from a rest api like this: content=$(curl -s -X GET -H "Header:Value" http://127.0.0.1:8200/etc) echo "${content}"| jq -r '.data.value' which produces the value I ...
0
votes
1answer
153 views

Download ZIP file of private GitHub repository using `wget` like `curl`

There are already some questions with answers how to download the ZIP file of GitHub repositories, but they don't work if the repository is private. I know it should work with wget somehow since it ...
2
votes
1answer
2k views

How to Resolve undefined reference to 'RAND_egd'

Debian 8 Jessie, OpenSSL version 1.1.0, cURL version: 7.50.2 I am trying to build curl on a Linux Debian system. All stages go well up until trying to build with make command. The linking stage fails ...
22
votes
5answers
46k views

Get URL's redirect target with curl

I would like to check where a single URL redirects. An example of that could be a link from Google's search result page (where a click always goes through Google server). Can I do that with curl?
0
votes
1answer
35 views

How to send a file for single POST parameter with CURL?

I want to send myfile.json for one POST parameter while specifying explicit value for another parameter with CURL. Is it possible? Something like POST a=value1&b=<load and encode from my file....
-1
votes
1answer
48 views

Is there a similar tool like Curl but is already included in Linux?

I'm not sure if there is a similar command/utility which comes along with Linux distro CentOs, Ubuntu and RedHat without installing Curl. Basically I'd like to do a command like below curl -H ...
0
votes
0answers
13 views

curl command - any option for site RDW and site SDB

I have an ftp command and i want to change it and use curl instead, but i am not able to find any options for site RDW and site SDB. Is there a solution? My ftp command is similar with: ftp ...
0
votes
1answer
137 views

Update Failed: Download failed. cURL error 6: Could not resolve host:

I am getting the error "Update Failed: Download failed. cURL error 6: Could not resolve host:"  on WordPress on my vps server...I have also noticed it in other applications as well. As a consequence, ...
2
votes
2answers
40 views

JQ Linux JSON Parse Unknown Key

I want to build an automated script which builds an new VPS Server on the page vultr.com. They also have an API Access and I could create it and receive also anything I need. The problem is, vultr ...
0
votes
0answers
61 views

How to pass JSON in a curl GET request?

I am trying to test a REST api. Using any other web browser, I can paste the URL into the address field and gt the desired result: https://some.company.com/SomeAppAPI?cmd=setSomeData&token=...
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
116 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
7k 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
2answers
113 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
113 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
3k 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
40 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 ...