response_headers
检查 HTTP 响应头的值。
语法
--- response_headers 段检查响应中的特定头部字段,每行一个,格式为 Header-Name: expected-value。
perl
1=== TEST 1: check headers2--- config3 location /t {4 add_header X-Custom "test-value";5 return 200 "ok";6 }7--- request8GET /t9--- response_headers10X-Custom: test-value11Content-Type: text/plain