mockttp
mockttp copied to clipboard
Powerful friendly HTTP mock server & proxy library
I want to create a mitm proxy that can only be access by providing correct credentials, e.g. I check if proxy-authentication has the correct value: ``` (async () => {...
Hello ! I'm trying to test my React component that's querying through a tRPC client using React Query's function `useSuspenseQuery` (for more info, click [here](https://tanstack.com/query/v5/docs/framework/react/reference/useSuspenseQuery)). I'm using Jest and I'm...
It would really be usefull if we could just add a *.domain.com to bypass ssl or use a regex
When trying to manipulate a beforeResponse, gunzip the request and gzip it again and set the `request.body.buffer = zlib.gzipSync(request.body.buffer)` and catching this with HttpToolkit this happends, I dont know if...
You can now pass a `Readable` stream into `rawBody` inside `thenCallback`. Fixes #98
Implementation https://github.com/httptoolkit/mockttp/blob/b50532a3549ccafc1ff5be2fa21dc8f6f54eab25/src/util/request-utils.ts#L233-L237 Types (why are these even separate?) https://github.com/httptoolkit/mockttp/blob/b50532a3549ccafc1ff5be2fa21dc8f6f54eab25/src/types.ts#L176-L181 JSON.parse can not return undefined (but can return null, which is not the same) and can return more than just `object`s...
I want to forward requests to a particular path but I am not able to do it using thenForwardTo(). It is throwing error and it only accepts hostname (without path)....
Hello, love your library, thank you ! I developed a CLI using mockttp, but every so often, I see the following on my program stdout: `Error: read ECONNRESET at TCP.onStreamRead...
I have a need to grab the passthrough server response stream and write it to a file. The goal is to be able to save matching responses to a file...
Is there any documentation on what's needed from a dev environment? My situation is that I've cloned the repo in WSL and tried to run `npm run ci-tests`. I immediately...