https://github.com/curl/curl

Resources


Basis


Basis

curl http://my.url
Get HTTP Content.


Flags

-s
Silent (do not print curl info).

-i
Show response Headers.

-L
Follow redirections.

-k
Ignore HTTPS Errors.

--tls-max 1.2
Set the maximum TLS version.

-u admin:admin
Provide Credentials.

-H 'myHeader: myValue'
Set Header.

-X POST
Specifies method.

-d
POST data.

-o myFile
Save response in a file.

Examples


GET Request with JWT

curl 'http://[TARGET_IP]/api/book/1' \
-H 'Authorization: Bearer [JWT_TOKEN]'
Example GET request with JWT.


POST Request with JSON Content

curl 'http://[TARGET_IP]/api/auth/login' \
-X POST \
-H "Content-Type: application/json" \
-d '{"username":"User","password":"P@ssw0rd"}'
Example POST request with JSON content.