TestHttpRequest
Request builder with fluent API for configuring test HTTP requests.
const response = await module.http .post('/api/v1/register') .withBody({ name: 'Test School' }) .withHeaders({ 'X-Custom': 'value' }) .send() Copy
const response = await module.http .post('/api/v1/register') .withBody({ name: 'Test School' }) .withHeaders({ 'X-Custom': 'value' }) .send()
Set Content-Type to application/json
Send the request and return response
Calls module.fetch() - NOT SELF.fetch()
Set the request body
Add headers to the request
TestHttpRequest
Request builder with fluent API for configuring test HTTP requests.
Example