MCPcopy
hub / github.com/fastify/fastify / addEcho

Function addEcho

test/http-methods/custom-http-methods.test.js:7–15  ·  view source on GitHub ↗
(fastify, method)

Source from the content-addressed store, hash-verified

5const Fastify = require('../../fastify')
6
7function addEcho (fastify, method) {
8 fastify.route({
9 method,
10 url: '/',
11 handler: function (req, reply) {
12 reply.send(req.body)
13 }
14 })
15}
16
17test('missing method from http client', (t, done) => {
18 t.plan(2)

Callers 1

Calls 2

routeMethod · 0.80
sendMethod · 0.80

Tested by

no test coverage detected