else:curl

This is an old revision of the document!


curl

curl https://www.google.com
curl --noproxy "*" https://www.google.com

Add -v or –verbose to the command. It will list out more information for your HTTP connection

-v, --verbose       Make the operation more talkative

POST

Connect to a local server with username and password. (Should use HTTPS for production site)

curl --noproxy "*" -v  http://127.0.0.1:8080/authenticate -d "username=username&password=password"

This could be user for JWT, header authentication.

curl http://127.0.0.1:8080/ -H "Something: anything"

add -k, or –insecure to the command.

-k, --insecure      Allow insecure server connections when using SSL

curl will not automatically redirect to a site like the browser does. In order to do it, add -L, or –location in the command

-L, --location      Follow redirects
  • else/curl.1591775825.txt.gz
  • Last modified: 2020/06/10 15:57
  • by chongtin