Skip to content

Instantly share code, notes, and snippets.

@hieunt79
hieunt79 / example.bash
Created November 30, 2020 07:16 — forked from schubert/example.bash
nginx config trick to force specific return code for testing
$ curl -I http://some.local.app.dev/?return=402
HTTP/1.1 402 Payment Required
Server: nginx/1.2.2
Date: Fri, 27 Jul 2012 19:08:19 GMT
Content-Type: text/html
Content-Length: 182
Connection: keep-alive
Keep-Alive: timeout=10
@hieunt79
hieunt79 / curl.md
Created November 2, 2019 07:38 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.