http-middleware
http-middleware copied to clipboard
Spawn an HTTP server from your request handlers or apply them to an existing server using a middleware.
In current version, multipart form request will throw a parsing error. This is because `createMiddleware()` treat `req.body` as the raw body and pass it to `new Request()`. But `req.body` is...
[This PR](https://github.com/mswjs/http-middleware/pull/19) coerces the MockedRequest body to be a buffer from a string (or stringified object). This works well _if_ `express.json()` middleware has been mounted because we need to un-parse...
Hello, I'm trying to use mswjs/data with mswjs/http-middleware with this code: _**db.js**_ ``` import { faker } from '@faker-js/faker' import { factory, primaryKey, oneOf } from '@mswjs/data' faker.seed(123) function createItem(db)...
We need a way to check compatibility with new msw release.
We should make http-middleware allow folks to create WebSocket servers based on the event handlers from MSW. - https://github.com/mswjs/msw/discussions/2010#discussioncomment-9546302 We can use `ws` and resolve the events against the event...
It is not possible to send a request using `multipart/form-data`. In other words, requests containing a `FormData` instance will fail if using the `http-middleware`, throwing the following error: ```bash TypeError:...