Got: Piping server request to Got should pipe headers too

Created on 6 Mar 2019  Â·  4Comments  Â·  Source: sindresorhus/got

Issuehunt badges

In the More about streams section, the request lib can also pipe the request headers, but looks like got won't do that, so the words could be more specific that got will only proxy response headers(at least for now) instead of both request and response headers.

szmarczak earned $80.00 by resolving this issue!

Rewarded on Issuehunt enhancement ✭ help wanted ✭

Most helpful comment

Yeah

All 4 comments

You can easily do that using req.pipe(got(url, {headers: req.headers})).pipe(res). Right, we should document this.

@sindresorhus Should this be the default behavior?

Yeah

@issuehunt has funded $80.00 to this issue.


@sindresorhus has rewarded $72.00 to @szmarczak. See it on IssueHunt

  • :moneybag: Total deposit: $80.00
  • :tada: Repository reward(0%): $0.00
  • :wrench: Service fee(10%): $8.00
Was this page helpful?
0 / 5 - 0 ratings

Related issues

carvallegro picture carvallegro  Â·  4Comments

joolfe picture joolfe  Â·  3Comments

astoilkov picture astoilkov  Â·  3Comments

f-mer picture f-mer  Â·  4Comments

framerate picture framerate  Â·  4Comments