MCPcopy
hub / github.com/simstudioai/sim / readResponseJsonWithLimit

Function readResponseJsonWithLimit

apps/sim/lib/core/utils/stream-limits.ts:300–308  ·  view source on GitHub ↗
(
  response: {
    headers?: { get(name: string): string | null }
    body?: ReadableStream<Uint8Array> | null
  },
  options: ReadResponseWithLimitOptions
)

Source from the content-addressed store, hash-verified

298}
299
300export async function readResponseJsonWithLimit<T = unknown>(
301 response: {
302 headers?: { get(name: string): string | null }
303 body?: ReadableStream<Uint8Array> | null
304 },
305 options: ReadResponseWithLimitOptions
306): Promise<T> {
307 return JSON.parse(await readResponseTextWithLimit(response, options)) as T
308}
309
310export async function readFileToBufferWithLimit(
311 file: File,

Callers 8

runFalQueueFunction · 0.90
generateWithOpenAIFunction · 0.90
generateWithGeminiFunction · 0.90
generateWithFalAIFunction · 0.90
readTtsErrorJsonFunction · 0.90
readDocusignJsonFunction · 0.90
readVideoJsonFunction · 0.90

Calls 2

parseMethod · 0.80

Tested by

no test coverage detected