grillon
grillon copied to clipboard
Support string literal for header built-in functions
The API should be a bit more more natural without all the boilerplate for passing expected headers. We keep the current way, for flexibility purpose, but we add the possibility to provide &str tuples :
.headers(vec![
("Content-Type", "application/json; charset=utf-8"),
("Content-Length", "42"),
])
It will be less verbose compared to :
.headers(contains(vec![
(
CONTENT_TYPE,
HeaderValue::from_static("application/json; charset=utf-8"),
),
(
CONTENT_LENGTH, HeaderValue::from_static("15")
)
]))