Skip to content

Commit

Permalink
fix: reinclude headers in request;
Browse files Browse the repository at this point in the history
- Closes #4
  • Loading branch information
lukeed committed Jan 30, 2019
1 parent 3d6d182 commit 33716d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ export function send(method, uri, opts={}) {
let out = '';
let o = { method };
let { redirect=true } = opts;
let headers = opts.headers || {};
Object.assign(o, typeof uri === 'string' ? parse(uri) : uri);
if (o.protocol === 'http:') o.agent = globalAgent;
o.headers = opts.headers || {};

let req = request(o, r => {
r.setEncoding('utf8');
Expand Down

0 comments on commit 33716d5

Please sign in to comment.