body()
Sets a raw response body. Does not apply any Content-Type
headers or other response transformations.
Call signature
1function body(data: any): MockedResponse
Examples
1rest.get('/user', (req, res, ctx) => {2 return res(ctx.body('text-body'))3})