Useful curl commands

Command to connect to host with port number:
1. curl -v telnet://127.0.0.1:8000


To capture only response
 curl --location --request GET "http://localhost:8000"
To capture response and its  statuscode
 curl --location --request GET "http://localhost:8000" -w "%{http_code}"
To capture response and its status code in a file
curl --location --request GET "http://localhost:8000" -w "%{http_code}"

Comments

Popular posts from this blog

Use full Links

GIT Commands