mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-27 05:53:16 +00:00
Update cheatsheets
This commit is contained in:
@@ -24,15 +24,15 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Send form-encoded data (POST request of type `application/x-www-form-urlencoded`). Use `--data @file_name` or `--data @'-'` to read from `stdin`:
|
||||
|
||||
`curl {{[-X|--request]}} POST {{[-d|--data]}} {{'name=bob'}} {{http://example.com/form}}`
|
||||
`curl {{[-X|--request]}} POST {{[-d|--data]}} '{{name=bob}}' {{http://example.com/form}}`
|
||||
|
||||
- Send a request with an extra header, using a custom HTTP method and over a proxy (such as BurpSuite), ignoring insecure self-signed certificates:
|
||||
|
||||
`curl {{[-k|--insecure]}} {{[-x|--proxy]}} {{http://127.0.0.1:8080}} {{[-H|--header]}} {{'Authorization: Bearer token'}} {{[-X|--request]}} {{GET|PUT|POST|DELETE|PATCH|...}} {{https://example.com}}`
|
||||
`curl {{[-k|--insecure]}} {{[-x|--proxy]}} {{http://127.0.0.1:8080}} {{[-H|--header]}} '{{Authorization: Bearer token}}' {{[-X|--request]}} {{GET|PUT|POST|DELETE|PATCH|...}} {{https://example.com}}`
|
||||
|
||||
- Send data in JSON format, specifying the appropriate Content-Type header:
|
||||
|
||||
`curl {{[-d|--data]}} {{'{"name":"bob"}'}} {{[-H|--header]}} {{'Content-Type: application/json'}} {{http://example.com/users/1234}}`
|
||||
`curl {{[-d|--data]}} '{{{"name":"bob"}}}' {{[-H|--header]}} '{{Content-Type: application/json}}' {{http://example.com/users/1234}}`
|
||||
|
||||
- Pass client certificate and private key for the request, skipping certificate validation:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user