davetemplin / web-request

Simplifies making web requests with TypeScript async/await
MIT License
35 stars 8 forks source link

User-agent ignored in WebRequest.defaults #11

Open snobu opened 7 years ago

snobu commented 7 years ago
WebRequest.defaults({ headers: {'User-Agent': 'curl/7.28.1'} });
var data = await WebRequest.get('http://localhost');

The request made over the wire:

GET / HTTP/1.1
host: localhost
Connection: close

What am i doing wrong? User-Agent doesn't make it in..

Using web-request 1.0.7 from npm.