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

Function handle_response

apps/backend/utils.js:291–301  ·  view source on GitHub ↗

* @brief Handle HTTP response data accumulation * * @param response [in] HTTP response object with event emitters * @param task_objid [in] Task identifier for tracking * @param memo [in] Operation memo for logging context * * Events Handled: * - 'data': Accumulates response chunks * - '

(response, task_objid, memo)

Source from the content-addressed store, hash-verified

289 * @note Response data accumulated in memory
290 */
291function handle_response(response, task_objid, memo) {
292 let response_data = '';
293
294 response.on('data', (chunk) => {
295 response_data += chunk;
296 });
297
298 response.on('end', () => {
299 process_response_data(response_data, task_objid, memo);
300 });
301}
302
303/**
304 * @brief Parses and processes HTTP response data

Callers 1

send_notificationFunction · 0.85

Calls 1

process_response_dataFunction · 0.85

Tested by

no test coverage detected