Skip to main content
Glama

Dodo Payments

Official
by dodopayments
headers.ts848 B
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { IncomingMessage } from 'node:http'; import { ClientOptions } from 'dodopayments'; export const parseAuthHeaders = (req: IncomingMessage): Partial<ClientOptions> => { if (req.headers.authorization) { const scheme = req.headers.authorization.split(' ')[0]!; const value = req.headers.authorization.slice(scheme.length + 1); switch (scheme) { case 'Bearer': return { bearerToken: req.headers.authorization.slice('Bearer '.length) }; default: throw new Error(`Unsupported authorization scheme`); } } const bearerToken = Array.isArray(req.headers['x-dodo-payments-api-key']) ? req.headers['x-dodo-payments-api-key'][0] : req.headers['x-dodo-payments-api-key']; return { bearerToken }; };

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/dodopayments/dodopayments-node'

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