X-Git-Url: https://git.josue.xyz/?a=blobdiff_plain;f=curlie%2FREADME.md;h=68de6fe15b056e7a86e0898558b7311469c8167e;hb=8e3cc6d1a888233fefa899f9b69c20b5a96ea81c;hp=8739aa494f2bfa88f4e9379681b33ccd7d3dd1a7;hpb=1c66e100020683aee4989038681075ab9d35e129;p=webi-installers%2F.git diff --git a/curlie/README.md b/curlie/README.md index 8739aa4..68de6fe 100644 --- a/curlie/README.md +++ b/curlie/README.md @@ -25,19 +25,19 @@ Use the `@beta` tag for pre-releases. **JSON** (`=`) is the default encoding for `key=value` pairs. -## Simple GET +### Simple GET ```bash curlie -v example.com ``` -## POST simple JSON with headers +### POST simple JSON with headers ```bash curlie -v POST httpbin.org/status/201 "Authorization: Bearer xxxx" "name=John Doe" ``` -## POST large JSON +### POST large JSON ```bash curlie -v POST httpbin.org/status/201 "Authorization: Bearer xxxx" -d ' @@ -48,3 +48,13 @@ curlie -v POST httpbin.org/status/201 "Authorization: Bearer xxxx" -d ' ] ' ``` + +### Spoof Host and SNI + +The `--resolve` option is for when you need to test a local service as if it had +a remote hostname and TLS SNI (or when you want to break things 😈). + +```bash +curlie https://foo.example.com:8443 "Host: foo.example.com" \ + --resolve foo.example.com:8443:127.0.0.1 +```