Tiny performs mutations on options passed in (such as headers); those options may be destructured from further up the prototype chain, and in doing so the mutation may have adverse impacts on unrelated operations completely outside the scope of tiny.
Suggest deep copying options before any mutations.
Repro steps:
let url = 'foo'
let headers = {'Accept': 'application/json'}
tiny.post({url, headers}, () => {
console.log(headers) // will be mutated from the POST, and include such params as User-Agent, Content-Type, Content-Length, etc.
})
Tiny performs mutations on options passed in (such as headers); those options may be destructured from further up the prototype chain, and in doing so the mutation may have adverse impacts on unrelated operations completely outside the scope of tiny.
Suggest deep copying options before any mutations.
Repro steps: