cannot pipe request after body-parser
See original GitHub issueI’m using body-parser to limit the size of a POST body. Adding the following line a request with some 3MB stucks on ‘100 continue’. No data is written.
app.use(bodyParser.raw({ limit: '5mb' }));
A request with 400kB is successful. Removing the above line the 3MB request (and larger requests) work fine. I’m using version 1.12.3. Maybe I have overseen something!?
Issue Analytics
- State:
- Created 8 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Node's request does not pass POST requests using pipe
The above code executes get requests just fine placed as a middleware in an express router, however on POST the proxiedServer never receives...
Read more >Piping request to another server doesn't work with request body
I'm using postman to test my API. I'm attempting to pipe the requests through my API to the corresponding services (also node). Everything...
Read more >express.Request.pipe JavaScript and Node.js code examples
assignKey(req.query); //Pipe is through request, this will just redirect //everything from the api to your own server at localhost. //It will also pipe...
Read more >Running Collection with a GET to an API and a POST to a ...
the GET request returns JSON containing multiple objects each with multiple name:value pairs inside a single array in a single object named ...
Read more >ExpressJS Form Data - Pabbly
Equipped with two major HTML forms GET request & POST request. ... and use the below code to install the body-parser(for parsing JSON...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ah, thanks, that
fss
usage is where your problem is. You can only read a stream one time in Node.js.req
was already read intoreq.body
ny this module, so yourreq.pipe
is what’s hanging. You just need to dowritable.end(req.body)
and removereadable.pipe(writeable)
.My pleasure 😃