Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Curl doesn't return anything

I have a web app hosted at A.B.C.D:5601 and when I try curl A.B.C.D:5601 it doesn't print out anything on the screen however when I open the same link using a browser it does open the webapp. But it gets forwarded to A.B.C.D:5601/foo/bar and it opens fine.

Here is the output of curl -v

*   Trying A.B.C.D:5601...
* TCP_NODELAY set
* Connected to A.B.C.D port 5601 (#0)
> GET / HTTP/1.1
> Host: A.B.C.D:5601
> User-Agent: curl/7.68.0
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 302 Found
< location: /spaces/enter
< x-content-type-options: nosniff
< referrer-policy: no-referrer-when-downgrade
 < cache-control: private, no-cache, no-store, must-revalidate
< content-length: 0
< Date: Tue, 08 Jun 2021 03:01:11 GMT
< Connection: keep-alive
< Keep-Alive: timeout=120
< 
* Connection #0 to host A.B.C.D left intact

Why is curl not giving me the response back?

like image 724
rimalroshan Avatar asked Jun 10 '26 20:06

rimalroshan


1 Answers

Curl is telling you you are being redirected to /spaces/enter.

You can tell Curl to automatically follow redirects:

curl -vL [url]
like image 132
Evert Avatar answered Jun 12 '26 12:06

Evert