NGHTTP(1)

๐Ÿ‘‘ NGHTTP(1) โ€” the nghttp page, but make it cute

okay bestie, so this is from nghttp2, and we're talking about nghttp โ€” literally the HTTP/2 client. manual name is NGHTTP(1) if you're keeping score. pull up a chair, we're doing this ๐Ÿ’…


โœจ NAME โœจ

nghttp โ€” HTTP/2 client. that's it, that's the vibe. ๐Ÿฆ‹


๐ŸŒธ SYNOPSIS ๐ŸŒธ

nghttp [OPTIONS]... <URI>...

๐Ÿ’– DESCRIPTION ๐Ÿ’–

HTTP/2 client. she's a client. she does HTTP/2. iconic.

  • URI โ€” Specify URI to access. (yes plural possible, look at the synopsis, we're eating good ๐Ÿ“)

๐ŸŽ€ OPTIONS ๐ŸŽ€

  • -v, --verbose โ€” Print debug information such as reception and transmission of frames and name/value pairs. and listen โ€” Specifying this option multiple times increases verbosity. so if once isn't enough, stack it. no cap. ๐Ÿ”
  • -n, --null-out โ€” Discard downloaded data. don't want it? don't keep it. bye ๐Ÿ’€
  • -O, --remote-name โ€” Save download data in the current directory. The filename is derived from URI. If URI ends with /, index.html is used as a filename. Not implemented yet. ๐Ÿ˜ญ so pretty but she's not here yet fr fr
  • -t, --timeout=<DURATION> โ€” Timeout each request after DURATION. Set 0 to disable timeout. zero means never, she's patient โณ
  • -w, --window-bits=<N> โ€” Sets the stream level initial window size to 2**<N>-1. math but make it stream-level ๐Ÿงฎ
  • -W, --connection-window-bits=<N> โ€” Sets the connection level initial window size to 2**<N>-1. same energy, but the whole connection this time ๐Ÿซถ
  • -a, --get-assets โ€” Download assets such as stylesheets, images and script files linked from the downloaded resource. Only links whose origins are the same with the linking resource will be downloaded. nghttp prioritizes resources using HTTP/2 dependency based priority. The priority order, from highest to lowest, is html itself, css, javascript and images. she's got a whole ranking system and honestly? obsessed. ๐ŸŒˆ
  • -s, --stat โ€” Print statistics. numbers!! love that for us ๐Ÿ“Š
  • -H, --header=<HEADER> โ€” Add a header to the requests. Example: -H':method: PUT'. look at that exact syntax, don't freestyle it ๐Ÿ’…
  • --trailer=<HEADER> โ€” Add a trailer header to the requests. HEADER must not include pseudo header field (header field name starting with ':'). To send trailer, one must use -d option to send request body. Example: --trailer 'foo: bar'. so like, no colon-starting names in there, and you NEED -d or it's not happening, periodt ๐Ÿšซ
  • --cert=<CERT> โ€” Use the specified client certificate file. The file must be in PEM format. PEM or nothing bestie ๐Ÿ“œ
  • --key=<KEY> โ€” Use the client private key file. The file must be in PEM format. also PEM. they match. it's giving couple goals ๐Ÿ”‘
  • -d, --data=<PATH> โ€” Post FILE to server. If '-' is given, data will be read from stdin. dash = stdin, you know the drill ๐Ÿ“
  • -m, --multiply=<N> โ€” Request each URI N times. By default, same URI is not requested twice. This option disables it too. so yeah she's got dedupe on by default and this option turns it ALL the way off ๐Ÿ”
  • -u, --upgrade โ€” Perform HTTP Upgrade for HTTP/2. This option is ignored if the request URI has https scheme. If -d is used, the HTTP upgrade request is performed with OPTIONS method. noted: https? she ignores you. and with -d it's OPTIONS, not what you'd expect โ€” love that for her ๐Ÿ™ˆ
  • --extpri=<PRI> โ€” Sets RFC 9218 priority of given URI. PRI must be the wire format of priority header field (e.g., "u=3,i"). This option can be used multiple times, and N-th --extpri option sets priority of N-th URI in the command line. If the number of this option is less than the number of URI, the last option value is repeated. If there is no --extpri option, urgency is 3, and incremental is false. okay so it's positional-ish, and the last one gets copy-pasted down the line, and the default vibe is urgency 3, incremental false. got it ๐Ÿ’œ
  • -M, --peer-max-concurrent-streams=<N> โ€” Use N as SETTINGS_MAX_CONCURRENT_STREAMS value of remote endpoint as if it is received in SETTINGS frame.

Default: 100

fake it like you received it. pretend play but for MAX_CONCURRENT_STREAMS ๐Ÿ˜Œ

  • -c, --header-table-size=<SIZE> โ€” Specify decoder header table size. If this option is used multiple times, and the minimum value among the given values except for last one is strictly less than the last value, that minimum value is set in SETTINGS frame payload before the last value, to simulate multiple header table size change. yeah this one's a mouthful. the point is: multiple uses can simulate multiple header table size change. don't skim it, she's being precise ๐Ÿงš
  • --encoder-header-table-size=<SIZE> โ€” Specify encoder header table size. The decoder (server) specifies the maximum dynamic table size it accepts. Then the negotiated dynamic table size is the minimum of this option value and the value which server specified. so: whoever's smaller wins. negotiation, but make it table sizes ๐Ÿค
  • -b, --padding=<N> โ€” Add at most N bytes to a frame payload as padding. Specify 0 to disable padding. at most!! and 0 = off ๐ŸŽˆ
  • -r, --har=<PATH> โ€” Output HTTP transactions PATH in HAR format. If '-' is given, data is written to stdout. dash again = stdout, and she's writing HAR ๐Ÿ”ฅ
  • --color โ€” Force colored log output. colors!! forced, not requested ๐ŸŒˆ
  • --continuation โ€” Send large header to test CONTINUATION. she's testing. it's a whole experiment ๐Ÿ”ฌ
  • --no-content-length โ€” Don't send content-length header field. skip it ๐Ÿ’…
  • --hexdump โ€” Display the incoming traffic in hexadecimal (Canonical hex+ASCII display). If SSL/TLS is used, decrypted data are used. so if it's TLS you get the decrypted stuff, not the scrambled stuff. iconic ๐Ÿ”ข
  • --no-push โ€” Disable server push. not today, server! ๐Ÿ›‘
  • --max-concurrent-streams=<N> โ€” The number of concurrent pushed streams this client accepts. how many pushes she'll tolerate, that's the number ๐Ÿซถ
  • --expect-continue โ€” Perform an Expect/Continue handshake: wait to send DATA (up to a short timeout) until the server sends a 100 Continue interim response. This option is ignored unless combined with the -d option. so she waits (a lil bit) for that 100 Continue โ€” and it does nothing unless you also pass -d. ๐Ÿ™ˆ
  • -y, --no-verify-peer โ€” Suppress warning on server certificate verification failure. it just mutes the warning, and honestly? be careful out there bestie ๐Ÿ’€
  • --ktls โ€” Enable ktls. short. sweet. enabled. โœจ
  • --version โ€” Display version information and exit. bye after that ๐Ÿฆ‹
  • -h, --help โ€” Display this help and exit. hi and bye ๐Ÿ‘‹

๐ŸŒŸ the small print about <SIZE> and <DURATION> ๐ŸŒŸ

The SIZE argument is an integer and an optional unit (e.g., 10K is 10 * 1024). Units are K, M and G (powers of 1024).

The DURATION argument is an integer and an optional unit (e.g., 1s is 1 second and 500ms is 500 milliseconds). Units are h, m, s or ms (hours, minutes, seconds and milliseconds, respectively). If a unit is omitted, a second is used as unit.

so like โ€” no unit on the duration means seconds. don't come for me, that's just what it says ๐Ÿซถ

๐Ÿ”ฅ SEE ALSO ๐Ÿ”ฅ

the whole friend group. go say hi ๐Ÿ’œ


๐Ÿ’œ Author ๐Ÿ’œ

Tatsuhiro Tsujikawa

2012, 2015, 2016, Tatsuhiro Tsujikawa


okay that's the whole thing, and one last thing โ€” this page is from version 1.70.0, dated Jul 29, 2026, out of nghttp2. that's a wrap, bestie, you're gonna do great ๐ŸŽ€โœจ๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from