-
Updated
Apr 7, 2022 - JavaScript
HTTP
HTTP (Hypertext Transfer Protocol) is a request and response protocol used to send a request to a server and receive a response back in the form of a file. HTTP is the basis of data communication for the web. HTTPS is an evolution in HTTP, where the “S” stands for secure socket layer allowing communication in HTTP to be more secure.
Here are 1,619 public repositories matching this topic...
Context
This isn't really a feature request, as what I need is possible with nock as-is. But I spent several hours searching, reading old issues and searching through the source code to find the solution, so I thought this might help others.
I am testing code that accesses a service that sets the statusMessage of the response, as well as the statusCode. I am using nock to mock the server
node-fetch currently completely ignoring Content-Length header while consuming response.
Fetch specification about handling Content-Length on server response says almost nothing:
https://fetch.spec.whatwg.org/#concept-http-network-fetch (see whatwg/fetch#67)
On other hand, we have a fetch-node specific extension to limit the size of the response.
My prop
-
Updated
Mar 22, 2022 - JavaScript
-
Updated
Mar 30, 2022 - JavaScript
-
Updated
Apr 6, 2022 - JavaScript
Bug Description
When mocking undici.fetch, and supplying a function to .intercept, the parameter's body can be an object (tested with FormData, maybe it falls back to not parsing on unsupported types?).
Reproducible By
import { fetch, FormData, MockAgent, setGlobalDispatcher } from 'undici';
import { Blob -
Updated
Mar 5, 2022 - JavaScript
-
Updated
Apr 10, 2022 - JavaScript
What you did:
Create a route:
/orders/*
then set the delay to 2000ms.
What happened:
route not delayed when hit with another param beside *
/orders/1 not delayed

/orders/900 not delayed
/orders/* delayed
 when starting up the server.
Steps to reproduce the issue, if applicable. Include the actual command and output and/or stack trace.
**What did you exp