Remove AgentBuilder::set headers
The headers are not scoped by host, which means using them for something like `Authorization` would effectively "leak" to all requests using the agent. Context: https://github.com/algesten/ureq/issues/203#issuecomment-716385310
This commit is contained in:
@@ -56,12 +56,11 @@ impl fmt::Debug for Request {
|
||||
|
||||
impl Request {
|
||||
pub(crate) fn new(agent: Agent, method: String, url: String) -> Request {
|
||||
let headers = agent.headers.clone();
|
||||
Request {
|
||||
agent,
|
||||
method,
|
||||
url,
|
||||
headers,
|
||||
headers: vec![],
|
||||
return_error_for_status: true,
|
||||
query: QString::default(),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user