Skip to main content

sareq put

Send HTTP PUT request to the specified URL

sareq put URL --body BODY [flags]

Options

  -B, --body string             define the body to send with HTTP request (e.g. '{"key1": 1, "key2": "abc"}') (required)
-H, --header stringToString add a header to include with HTTP request (e.g. "key=value") (default [])
--timeout int specify timeout to use with HTTP request (default 10)
--no-color disable coloring in HTTP response
--no-prettify disable prettification in HTTP response
-h, --help help for put

Examples

# basic PUT request
sareq put https://api.example.com/users/user123 --body '{"name": "John Doe"}'

# PUT request with header
sareq put https://api.example.com/users/user123 --header "Authorization=abc123" --body '{"name": "John Doe"}'

See Also

  • sareq - A modern, open-source HTTP client for the command line