Skip to main content

has_header

Function has_header 

Source
pub fn has_header(response: &Response, header_name: &str) -> bool
Expand description

Check if response has a specific header

ยงExamples

use reinhardt_testkit::http::{create_test_response, has_header};

let response = create_test_response().with_header("x-api-version", "v1");
assert!(has_header(&response, "x-api-version"));
assert!(!has_header(&response, "x-missing-header"));