The response has no header called name (any case). A failure names the header and its value.
hello :: () -> string {
return "hello";
}
main :: () {
app: App;
defer free_app(*app);
get(*app, "/hello", hello);
api := test_client(*app);
response, _ := get(api, "/hello");
defer close(*response);
assert(expect_no_header(response, "Set-Cookie"));
assert(expect_header(response, "Content-Type"));
}Doesn't run in the browser (skipped on wasm).
expect_no_header :: (
response: Client_Response,
name: string,
loc := #caller_location
) -> bool
The response has no header called name (any case). A failure names the header and its value.
Parameters
- response: Client_Response
- name: string
- loc := #caller_location
Returns
- bool
hello :: () -> string {
return "hello";
}
main :: () {
app: App;
defer free_app(*app);
get(*app, "/hello", hello);
api := test_client(*app);
response, _ := get(api, "/hello");
defer close(*response);
assert(expect_no_header(response, "Set-Cookie"));
assert(expect_header(response, "Content-Type"));
}Doesn't run in the browser (skipped on wasm).