Skip to main content

with_headers

Function with_headers 

Source
pub async fn with_headers<F, T>(headers: HeaderMap, f: F) -> T
where F: Future<Output = T>,
Expand description

Run an async call with additional HTTP headers injected into every request made within the future f. Headers are scoped to this task only, so concurrent calls with different headers are safe.