MCPcopy
hub / github.com/hapijs/hapi / handler

Function handler

test/transmit.js:39–44  ·  view source on GitHub ↗
(request, h)

Source from the content-addressed store, hash-verified

37 const server = Hapi.server();
38
39 const handler = (request, h) => {
40
41 const error = Boom.badRequest();
42 error.output.headers.invalid = '\u1000';
43 throw error;
44 };
45
46 server.route({ method: 'GET', path: '/', handler });
47 const res = await server.inject('/');

Callers

nothing calls this directly

Calls 6

emitMethod · 0.80
destroyMethod · 0.80
typeMethod · 0.65
responseMethod · 0.65
onMethod · 0.65
codeMethod · 0.65

Tested by

no test coverage detected