cancel
Showing results for 
Search instead for 
Did you mean: 

curl

FIXED
grumble
Rising Star
Posts: 135
Thanks: 23
Registered: ‎15-09-2024

curl

C:\Users\user2>curl https://www.amazon.co.uk
Warning: Binary output can mess up your terminal. Use "--output -" to tell curl to output it to your terminal anyway,
Warning: or consider "--output <FILE>" to save to a file.

 

After using --output (with resultant unreadable output), the binary stuff displayed in a command line window rang my bell (after a delay of about 5-6 seconds). A ding-dong (which my mail client plays when new mail arrives). The mail client wasn't active at the time.

 

Trying curl with other websites over https doesn't result in the same.

 

Does anyone have any (technical) insight? 'Googling' amazon and curl just brings up hair curling utensils marketed on amazon.

10 REPLIES 10
Baldrick1
Moderator
Moderator
Posts: 12,658
Thanks: 5,802
Fixes: 430
Registered: ‎30-06-2016

Re: curl

Moderator's note:
Thread moved from Everything Else to Tech Help

Moderator and Customer
If this helped - select the Thumb
If it fixed it,  help others - select 'This Fixed My Problem'

TheRoadCrew
Aspiring Pro
Posts: 162
Thanks: 53
Fixes: 11
Registered: ‎14-05-2017

Re: curl


@grumble wrote:

[...]

Does anyone have any (technical) insight? 'Googling' amazon and curl just brings up hair curling utensils marketed on amazon.


 

From the curl man page:

DESCRIPTION
curl is a tool for transferring data from or to a server using URLs. It supports these protocols: DICT, FILE, FTP, FTPS, GOPHER, GOPHERS, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, MQTT, POP3, POP3S, RTMP,
RTMPS, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, TELNET, TFTP, WS and WSS.

 You would need to specify which data you want to transfer

Something like

curl -O https://mirror.server.net/linuxmint/iso/debian/lmde-6-cinnamon-64bit.iso

would download (transfer) that iso image.

Alternatively, I may be misunderstanding what you are asking.

TheRoadCrew
Aspiring Pro
Posts: 162
Thanks: 53
Fixes: 11
Registered: ‎14-05-2017

Re: curl


@TheRoadCrew wrote:

Alternatively, I may be misunderstanding what you are asking.


Actually, running

$ curl https://www.amazon.co.uk > amazon.txt

saves the output for me. Forum software won't let me attach the txt file 'cos it contains html.

 

 

 

grumble
Rising Star
Posts: 135
Thanks: 23
Registered: ‎15-09-2024

Re: curl

OK

 

running

curl https://www.amazon.co.uk > amazon.txt

 

Screenshot of the first page of the resultant amazon.txt

Screenshot 2025-03-08 222222.jpg

 

TheRoadCrew
Aspiring Pro
Posts: 162
Thanks: 53
Fixes: 11
Registered: ‎14-05-2017

Re: curl

Fix

I don't see any binary at all:

Amazon_txt.jpgOdd that only Amazon behaves this way for you; don't know if why do i get binary output using curl? is relevant in this case.

grumble
Rising Star
Posts: 135
Thanks: 23
Registered: ‎15-09-2024

Re: curl

It was the '--compressed' option that was the solution. Thanks. Smiley

 

Although I am unsure why I need to specify that when you don't. One answer often leads to more questions.

TheRoadCrew
Aspiring Pro
Posts: 162
Thanks: 53
Fixes: 11
Registered: ‎14-05-2017

Re: curl


@grumble wrote:

[...]

Although I am unsure why I need to specify that when you don't.


If you are using curl shipped by Microsoft perhaps it has something to do with the curl alias (if it still exists).

Townman
Superuser
Superuser
Posts: 24,753
Thanks: 10,636
Fixes: 184
Registered: ‎22-08-2007

Re: curl

Could this be the difference between running in Poweshell vs a CMD prompt?

Superusers are not staff, but they do have a direct line of communication into the business in order to raise issues, concerns and feedback from the community.

grumble
Rising Star
Posts: 135
Thanks: 23
Registered: ‎15-09-2024

Re: curl

Dunno, but I'll give it a test later. (This will only be under Win10. Whether there's a difference under Win11 I may never find out).

 

I'll go back and give Roadcrew a 'fix'. In the dim and distant past I've come across gflate(?) in HTTP and that had been relegated to the back of my brain into the 'use it or lose it' category.

grumble
Rising Star
Posts: 135
Thanks: 23
Registered: ‎15-09-2024

Re: curl

It appears that a momentary warning(?) flashes up (in yellow, before disappearing) in Powershell (both as a 'normal' user and as an admin), then it appears that powershell automagically tries the --compressed option.