post request results in timeout when providing body, header, or both
See original GitHub issuePrerequisites
- I confirm my issue is not in the opened issues
- I confirm the Frequently Asked Questions didn’t contain the answer to my issue
Environment check
- I’m using the latest
msw
version - I’m using Node.js version 14 or higher
Node.js version
14 / 16
Reproduction repository
https://codesandbox.io/s/laughing-ully-x4wt2w
Reproduction steps
open provided CodeSandbox and run npm test
; only the test case executing a POST request with neither body nor header provided succeeds, the others fail
Current behavior
When providing data (i.e. body) to a POST
request, the test ends in a timeout.
A breakpoint within the request handler of the ‘mocked server’ is not even reached.
The exact same request when used against a ‘real’ nodeJS server (express)
Expected behavior
The tests should not result in a timeout and instead get processed by the handler.
I can not rule out, that my set up is wrong, however i followed the instructions to the best of my knowledge and understanding
Issue Analytics
- State:
- Created a year ago
- Reactions:3
- Comments:5 (1 by maintainers)
Top Results From Across the Web
I get a timeout when getting a response from a POST HTTP ...
I was able to fix it and get the response by closing the TCP connection. I inserted a key and value pair in...
Read more >408 Request Timeout - HTTP - MDN Web Docs
It is sent on an idle connection by some servers, even without any previous request by the client.
Read more >Http request timeout - OSS Support - k6 community forum
I am trying to use the timeout param for one http request that can take more than 60s to return, but it seems...
Read more >HTTP request timeouts in Go for beginners - ITNEXT
The http request timeout can be defined on the client side using multiple ... Request Header , Request Body , Response Header and...
Read more >Slow HTTP POST vulnerability - Qualys Discussions
Is there any other way to mitigate this vulnerability? ... scanner from Slow Http Post: slow down in headers section or in message...
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
oh fck, same issue for me
Okay i just noticed: when using jest/babel-jest v^26.0.0 it works as expect. Therefore there must be an issue with v27 of those libaries