curl

Passing ETag as Bash Variable to cURL

Passing ETag as Bash Variable to cURL I’m struggling passing my etag to cURL and getting a successful response. I get the etag with: etag=$( curl -SIXGET -u $token -H "Accept: application/json" "$api_url/domain-types/activation_run/collections/pending_changes" | awk ‘/^ETag:/ { print $2 }’ I have verified that this returns the correct etag. However the following cURL request fails: …

Total answers: 1

Can cURL get the Username and Password Fields From a Website?

Can cURL get the Username and Password Fields From a Website? I’m using cURL to login to several websites. Looking through the DOM manually to get the fields for the username and password fields is tedious for my case. I’ll then parse the fields and use the curl -d command to login. The only reason …

Total answers: 2

Can't access the site with non-browser clients, but works with the web browser

Can't access the site with non-browser clients, but works with the web browser I can navigate to a web site using a web browser. But trying a GET request with curl hangs. For example, the command curl -vL my_url gets stuck with the following log: * Host $url:443 was resolved. * IPv6: *** * IPv4: …

Total answers: 3

Use axel to get source instead curl for fetchurl in NixOS

Use axel to get source instead curl for fetchurl in NixOS I’m trying to start a shell with Cuda. I have following shell.nix file { pkgs ? import <nixpkgs> { } }: pkgs.mkShell { name = "cuda-env-shell"; buildInputs = with pkgs; [ unzip # other packages cudatoolkit # other packages binutils ]; } But this …

Total answers: 1

Why does wget work and curl fail with a specific REST URL?

Why does wget work and curl fail with a specific REST URL? In answering a question on another site, I came across a strange discrepancy between curl and wget when trying to fetch from this URL: https://www.uniprot.org/uniprot/A2Z669.fasta For some reason, curl just silently fails to download, while wget correctly fetches the file A2Z669.fasta: $ ls …

Total answers: 1

How to parse strace recvfrom syscall?

How to parse strace recvfrom syscall? I strace a curl command: strace -s 2000 -f curl google.com and see 2 DNS queries recvfrom(3, "302325201200116google3com3416google3com34136220*24P@t10v 16", 2048, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("192.168.65.7")}, [28->16]) = 66 recvfrom(3, "X320201200116google3com116google3com111)4216372263356", 65536, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("192.168.65.7")}, [28->16]) = 54 Then, I see a connect() syscall to 142.250.179.238 which is a Google’s …

Total answers: 1

Is curlftpfs missing in debian 12?

Is curlftpfs missing in debian 12? Tried to install curlftpfs in debian 12 says that the package is missing. While I understand that the package is still not active developed I use often curlftpfs inside some virtual machines transfer to transfer between various fs eg. windows/linux VMs that pass files through filezilla server and so …

Total answers: 1

error: libcurl >= 7.28.0 library and headers are required with support for https

error: libcurl >= 7.28.0 library and headers are required with support for https I’m sorry for having written such a long question, but given how many times similar questions have been asked, I felt like I had to give a lot more context. In my system, I get. . . checking for curl-config… /usr/bin/curl-config checking …

Total answers: 1

Moving 3 pics randomly to another directory

Moving 3 pics randomly to another directory I am using Linux and I’m in a folder it has 10 .jpg images I want to move 3 pictures only without selection by name or size for example my folder is /sdcard /DCIM/camera/ I want 3 pictures from it to /sdcard using a Linux command it’s possible? …

Total answers: 1

Getting Error "{"errorMessages":["There was an error parsing JSON. Check that your request body is valid."]}

Getting Error "{"errorMessages":["There was an error parsing JSON. Check that your request body is valid."]} curl –request POST –url ‘https://bankofloyal.atlassian.net/rest/api/2/issue’ –user aditya.singh@lji.io:$JIRA_TOKEN –header ‘Accept: application/json’ –header ‘Content-Type: application/json’ –data ‘{ "fields": { "project": { "key": "’$JIRA_PROJECT’" }, "parent": { "key": "’$PARENT_ISSUE_KEY’" }, "components": [ { "id": "’$COMPONENT_ID’" } ], "summary": "Directories with migration changes: ‘"${DIR_JOINED}"’", …

Total answers: 2

Symbol lookup error with curl

Symbol lookup error with curl Every time curl or a program that uses it is run I get the same error message [curl/program that uses curl somewhere]: symbol lookup error: /lib64/libcurl.so.4: undefined symbol: nghttp2_option_set_no_rfc9113_leading_and_trailing_ws_validation I’ve seen a lot of similar questions to this, usually with different distros (i’m using OpenSUSE Tumbleweed) and with a slightly …

Total answers: 1

Firewalld with variable source

Firewalld with variable source I’m writing a script and I’m stuck. I have a url (https://file.test.com/tips) that contains a file with the list of network subnets. File content: {192.168.1.0/24,10.0.0.0/24,2001:aaaa:bbbb:cccc::/64} When I try to run # firewall-cmd –permanent –zone=trusted –add-source="$(curl https://file.test.com/tips)" I get Error: INVALID_ADDR: Zone ‘trusted’: invalid source ‘{192.168.1.0/24,10.0.0.0/24,2001:aaaa:bbbb:cccc::/64}’ It works just fine when I …

Total answers: 1

Why curl running from a container complains about local issuer certificate when all the certificates are supposedly present?

Why curl running from a container complains about local issuer certificate when all the certificates are supposedly present? Here is my docker command line: mark@L-R910LPKW:~$ docker run -v /etc/ssl:/etc/ssl -v /usr/local/share/ca-certificates:/usr/local/share/ca-certificates -v /usr/share/ca-certificates:/usr/share/ca-certificates curlimages/curl -ksvo /dev/null https://registry.yarnpkg.com/csstype/-/csstype-3.0.8.tgz * Trying 104.16.19.35:443… * Connected to registry.yarnpkg.com (104.16.19.35) port 443 (#0) * ALPN: offers h2,http/1.1 } [5 bytes …

Total answers: 1

Download files from gnome-look.org via CLI

Download files from gnome-look.org via CLI I can download extensions from https://extensions.gnome.org/ or https://cinnamon-spices.linuxmint.com/ using curl. However, I am unable to do it from https://www.gnome-look.org To be specific, I am trying to download the zip files from https://www.gnome-look.org/p/1309239 and https://www.gnome-look.org/p/1308808 I found that the download links look like https://files03.pling.com/api/files/download/j/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MTY3OTUwODg0MywidSI6bnVsbCwibHQiOiJkb3dubG9hZCIsInMiOiI1YWI5OWZkYjg3ZDMxYTlmYzEwZTdjNGE5YTQ0YTE2ZTdmNDI5ZDVhOTFkYzI3MGVhNzZhYTE1OTg2ZTQ1YmIwYjNjZDM3NTYwMjU4ZDJkMzQ1YWY2ZDNiMWFmZTcxNDA4NTU2OTc4Zjg3ZWFkN2EyMzgyOTJjNjM0YmEyMDllMCIsInQiOjE2ODIzMjI2ODUsInN0ZnAiOm51bGwsInN0aXAiOm51bGx9.wHIMzT4EdVvErh625hc2cOlVfge51l0_lcC067fEqWM/Solarized-Dark-Cyan-3.0.3.tar The issue is the links can …

Total answers: 1

How to send multiline data in curl body within bash script?

How to send multiline data in curl body within bash script? I am trying to send multi-line comment in the curl body from bash script. Below is my curl invocation. #!/bin/bash temp="This is sample data: 2019/05/21 03:33:04 This is 2nd sample data: #2 Sample_Data" response=$(curl -sS –location "${HEADERS[@]}" -w "%{http_code}n" -X POST "$url" –header ‘Content-Type: …

Total answers: 1

curl 7.87.0 ignores –output argument

curl 7.87.0 ignores –output argument When I call curl –output quarto.deb -L $(curl https://quarto.org/docs/download/_prerelease.json | grep -oP "(?<="download_url":s")https.*${ARCH}.deb") the output is % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 26098 100 26098 0 0 33576 0 –:–:– –:–:– –:–:– 33588 % Total % Received …

Total answers: 1

Curl Error 60 After Accidentally Deleting known_hosts file

Curl Error 60 After Accidentally Deleting known_hosts file I have a couple of Raspberry Pies that upload webcam images to a web host using a bash shell script. This is the upload code, which is identical on each Pi: curl -s -S -u myname: –connect-timeout 25 –max-time 40 –retry 3 –pubkey ~/.ssh/id_rsa.pub -T $file $host …

Total answers: 1

Apache Server: HTTP/2 issues

Apache Server: HTTP/2 issues I’ve just set up a small Apache VM and enabled the HTTP/2 module as described in the documentation (HTTP/2 guide). To test it out, the recommendation is to use the non-browser client curl. However, I’m noticing some strange issues. When curl is told to use HTTP2 (curl –http2), Apache writes 2 …

Total answers: 2

Expand variable in the JSON payload of a curl command

Expand variable in the JSON payload of a curl command I have a shell script that sends a post request with curl. #!/bin/sh NEXT_JOB_COMMANDS='["sleep", "200s"]’ STATUS="successful" if [ "$STATUS" = "successful" ] then NEXT_JOB_ID=$(curl -s "localhost:5050/processes/gdalEcho/execution" –header ‘Content-Type: application/json’ –data ‘{ "commandOverride": ["sleep", "200s"] }’) echo "$NEXT_JOB_ID" fi It runs fine until I try to …

Total answers: 2

Cant run curl with arguments from .desktop file

Cant run curl with arguments from .desktop file I’ve been trying to get a .desktop file to open a new full screen terminal, run "curl wttr.in" (wttr.in is a weather forecast service that works well with the terminal) , and leave the window open. I have managed to get other commands to run in a …

Total answers: 1