Skip to main content
Glama
res.js860 B
'use strict' module.exports = { mapHttpResponse, resSerializer } const rawSymbol = Symbol('pino-raw-res-ref') const pinoResProto = Object.create({}, { statusCode: { enumerable: true, writable: true, value: 0 }, headers: { enumerable: true, writable: true, value: '' }, raw: { enumerable: false, get: function () { return this[rawSymbol] }, set: function (val) { this[rawSymbol] = val } } }) Object.defineProperty(pinoResProto, rawSymbol, { writable: true, value: {} }) function resSerializer (res) { const _res = Object.create(pinoResProto) _res.statusCode = res.headersSent ? res.statusCode : null _res.headers = res.getHeaders ? res.getHeaders() : res._headers _res.raw = res return _res } function mapHttpResponse (res) { return { res: resSerializer(res) } }

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