Skip to main content
Glama
copy.test.js698 B
'use strict' const { test } = require('node:test') const fastify = require('../../fastify')() fastify.addHttpMethod('COPY') test('can be created - copy', async t => { t.plan(3) t.after(() => fastify.close()) try { fastify.route({ method: 'COPY', url: '*', handler: function (req, reply) { reply.code(204).send() } }) t.assert.ok(true) } catch (e) { t.assert.fail() } const fastifyServer = await fastify.listen({ port: 0 }) const result = await fetch(`${fastifyServer}/test.txt`, { method: 'COPY', headers: { Destination: '/test2.txt' } }) t.assert.ok(result.ok) t.assert.strictEqual(result.status, 204) })

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/krtw00/search-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server