Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions src/async_impl/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -794,9 +794,15 @@ impl Client {
update = update.emulation(impersonate.0);
}

// Default headers options.
if let Some(mut default_headers) = params.headers.take() {
update = update.headers(|headers| std::mem::swap(headers, &mut default_headers.0));
// Updated headers options.
if let Some(mut updated_headers) = params.headers.take() {
update = update.headers(|default_headers| {
for (name, value) in updated_headers.0.drain() {
if let Some(name) = name {
default_headers.insert(name, value);
}
}
});
}

// Headers order options.
Expand Down
Loading