OS Manuals

/usr/bin/nghttp

experimental HTTP/2 client, server and library

From nghttp2 1.71.0-r0 (os), captured 2026-11-05 by running nghttp --help (exit 0). permalink

Usage: nghttp [OPTIONS]... <URI>...
HTTP/2 client

  <URI>       Specify URI to access.
Options:
  -v, --verbose
              Print   debug   information   such  as   reception   and
              transmission of frames and name/value pairs.  Specifying
              this option multiple times increases verbosity.
  -n, --null-out
              Discard downloaded data.
  -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.
  -t, --timeout=<DURATION>
              Timeout each request after <DURATION>.  Set 0 to disable
              timeout.
  -w, --window-bits=<N>
              Sets the stream level initial window size to 2**<N>-1.
  -W, --connection-window-bits=<N>
              Sets  the  connection  level   initial  window  size  to
              2**<N>-1.
  -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.
  -s, --stat  Print statistics.
  -H, --header=<HEADER>
              Add a header to the requests.  Example: -H':method: PUT'
  --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'.
  --cert=<CERT>
              Use  the specified  client certificate  file.  The  file
              must be in PEM format.
  --key=<KEY> Use the  client private key  file.  The file must  be in
              PEM format.
  -d, --data=<PATH>
              Post FILE to server. If '-'  is given, data will be read
              from stdin.
  -m, --multiply=<N>
              Request each URI <N> times.  By default, same URI is not
              requested twice.  This option disables it too.
  -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.
  --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.
  -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
  -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.
  --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.
  -b, --padding=<N>
              Add at  most <N>  bytes to a  frame payload  as padding.
              Specify 0 to disable padding.
  -r, --har=<PATH>
              Output HTTP  transactions <PATH> in HAR  format.  If '-'
              is given, data is written to stdout.
  --color     Force colored log output.
  --continuation
              Send large header to test CONTINUATION.
  --no-content-length
              Don't send content-length header field.
  --hexdump   Display the  incoming traffic in  hexadecimal (Canonical
              hex+ASCII display).  If SSL/TLS  is used, decrypted data
              are used.
  --no-push   Disable server push.
  --max-concurrent-streams=<N>
              The  number of  concurrent  pushed  streams this  client
              accepts.
  --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.
  -y, --no-verify-peer
              Suppress  warning  on  server  certificate  verification
              failure.
  --ktls      Enable ktls.
  --version   Display version information and exit.
  -h, --help  Display this help and exit.

--

  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.
Options (32)
OptionDescriptionSource
-v, --verbosePrint debug information such as reception and transmission of frames and name/value pairs.help + man
-n, --null-outDiscard downloaded data.help + man
-O, --remote-nameSave download data in the current directory.help + man
-t, --timeout DURATIONTimeout each request after <DURATION>.help + man
-w, --window-bits NSets the stream level initial window size to 2**<N>-1.help + man
-W, --connection-window-bits NSets the connection level initial window size to 2**<N>-1.help + man
-a, --get-assetsDownload assets such as stylesheets, images and script files linked from the downloaded resource.help + man
-s, --statPrint statistics.help + man
-H, --header HEADERAdd a header to the requests.help + man
--trailer HEADERAdd a trailer header to the requests.help + man
--cert CERTUse the specified client certificate file.help + man
--key KEYUse the client private key file.help + man
-d, --data PATHPost FILE to server.help + man
-m, --multiply NRequest each URI <N> times.help + man
-u, --upgradePerform HTTP Upgrade for HTTP/2.help + man
--extpri PRISets RFC 9218 priority of given URI.help + man
-M, --peer-max-concurrent-streams NUse <N> as SETTINGS_MAX_CONCURRENT_STREAMS value of remote endpoint as if it is received in SETTINGS frame.help + man
-c, --header-table-size SIZESpecify decoder header table size.help + man
--encoder-header-table-size SIZESpecify encoder header table size.help + man
-b, --padding NAdd at most <N> bytes to a frame payload as padding.help + man
-r, --har PATHOutput HTTP transactions <PATH> in HAR format.help + man
--colorForce colored log output.help + man
--continuationSend large header to test CONTINUATION.help + man
--no-content-lengthDon't send content-length header field.help + man
--hexdumpDisplay the incoming traffic in hexadecimal (Canonical hex+ASCII display).help + man
--no-pushDisable server push.help + man
--max-concurrent-streams NThe number of concurrent pushed streams this client accepts.help + man
--expect-continuePerform an Expect/Continue handshake: wait to send DATA (up to a short timeout) until the server sends a 100 Continue interim response.help + man
-y, --no-verify-peerSuppress warning on server certificate verification failure.help + man
--ktlsEnable ktls.help + man
--versionDisplay version information and exit.help + man
-h, --helpDisplay this help and exit.help + man

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.