apache bench でリクエストに指定のヘッダをつける
Dec 13, 2021 17:59 · 118 words · 1 minute read
たとえば Authorization ヘッダだとこんな感じでつけられる。
$ ab -n 10 -c 1 -H "Authorization: Bearer xxxxxxxx" "https://example.com/test"
ヘッダ
-H オプションで設定できる。
    -H attribute    Add Arbitrary header line, eg. 'Accept-Encoding: gzip'
その他
そのほか最低この2つのオプションがわかっていれば、ざっくりとした確認はできる。
    -n requests     Number of requests to perform
    -c concurrency  Number of multiple requests to make at a time