// provide an endpoint handler for the GET method app.get("/", (_, res) => { res.format({ default: () =>res.status(406).end(), json: () =>res.json({}).end(), }); });
// resource handle get requests test(restHALTestTools.implementSDCN, "get");
Param
Test execution context
Param
Http method
Param
Content Type not supported by resource
method handler used to trigger the handler to respond with a status
code of 406 ("not-supported-content-type" by default).
Test that resource
method
handling implement Server Driven Content NegotiationThis is a test macro. It can be used to test handling any HTTP method supported by SuperAgent.
Example use of this test in typescript:
Param
Test execution context
Param
Http method
Param
Content Type not supported by resource
method
handler used to trigger the handler to respond with a status code of 406 ("not-supported-content-type" by default).