> require('.')('http://httpbin.org/anything').then(resp => console.log(resp.body)) // using master
...
> {
"args": {},
"data": "",
"files": {},
"form": {},
"headers": {
"Accept-Encoding": "gzip, deflate",
"Connection": "close",
"Host": "httpbin.org",
"User-Agent": "got/9.1.0 (https://github.com/sindresorhus/got)"
},
"json": null,
"method": "GET",
"origin": "xxx.xxx.xxx.xxx",
"url": "http://httpbin.org/anything"
}
Wireshark log:
Hypertext Transfer Protocol
GET /anything HTTP/1.1\r\n
user-agent: got/9.1.0 (https://github.com/sindresorhus/got)\r\n
accept-encoding: gzip, deflate\r\n
Host: httpbin.org\r\n
Connection: close\r\n
\r\n
[Full request URI: http://httpbin.org/anything]
[HTTP request 1/1]
Ok, great. We should at least implement the same tests as https://github.com/request/request/pull/2904/files#diff-5db92d37ce5156ccbf7499555bdd0bf9R183 so we don't accidentally regress in the future.
Will do.
Most helpful comment
Ok, great. We should at least implement the same tests as https://github.com/request/request/pull/2904/files#diff-5db92d37ce5156ccbf7499555bdd0bf9R183 so we don't accidentally regress in the future.