fix(http): create a copy of headers when merge options (#13365)
Closes #11980
This commit is contained in:

committed by
Victor Berchet

parent
56dce0e26d
commit
2e500cc85b
@ -121,7 +121,7 @@ export class RequestOptions {
|
||||
merge(options?: RequestOptionsArgs): RequestOptions {
|
||||
return new RequestOptions({
|
||||
method: options && options.method != null ? options.method : this.method,
|
||||
headers: options && options.headers != null ? options.headers : this.headers,
|
||||
headers: options && options.headers != null ? options.headers : new Headers(this.headers),
|
||||
body: options && options.body != null ? options.body : this.body,
|
||||
url: options && options.url != null ? options.url : this.url,
|
||||
params: options && this._mergeSearchParams(options.params || options.search),
|
||||
|
Reference in New Issue
Block a user