I want to pipe() with request
request
.get(url)
.pipe(process.stdout)
works and prints to console. Now, if I try to add headers as in
request
.get(url)
.setHeader(headers)
.pipe(process.stdout)
I get Property 'pipe' does not exist on type 'void'. If I do it the other way around I get Property 'setHeader' does not exist on type 'WriteStream...
Are the combinations of these "inline arguments" limited or am I doing something substantially wrong?