MCPcopy Create free account
hub / github.com/AS-AIGC/TranscriptHub / prepare_request_options

Function prepare_request_options

apps/backend/utils.js:263–275  ·  view source on GitHub ↗

* @brief Prepare HTTPS request configuration * * @param config [in] Server configuration object containing: * - server [string] Target hostname * - port [number] Target port * - path [string] API endpoint path * - method [string] HTTP method * @param data [in] Request body payl

(config, data)

Source from the content-addressed store, hash-verified

261 * @note SSL verification intentionally disabled
262 */
263function prepare_request_options(config, data) {
264 return {
265 hostname: config.server,
266 port: config.port,
267 path: config.path,
268 method: config.method,
269 rejectUnauthorized: false,
270 headers: {
271 'Content-Type': 'application/json',
272 'Content-Length': Buffer.byteLength(data)
273 }
274 };
275}
276
277/**
278 * @brief Handle HTTP response data accumulation

Callers 1

send_notificationFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected