text()
Sets a textual response body. Appends a Content-Type: text/plain
header on the response.
Call signature
1function text(data: string): MockedResponse
Examples
1rest.get('/quote', (req, res, ctx) => {2 return res(3 ctx.text(4 'The future belongs to those who believe in the beauty of their dreams.',5 ),6 )7})