MCPcopy Index your code
hub / github.com/simstudioai/sim / makeRequest

Function makeRequest

apps/sim/lib/core/utils/multipart.test.ts:43–54  ·  view source on GitHub ↗
(
  parts: Part[],
  opts?: { chunkSize?: number; contentType?: string; boundary?: string }
)

Source from the content-addressed store, hash-verified

41}
42
43function makeRequest(
44 parts: Part[],
45 opts?: { chunkSize?: number; contentType?: string; boundary?: string }
46) {
47 const boundary = opts?.boundary ?? BOUNDARY
48 return {
49 headers: new Headers({
50 'content-type': opts?.contentType ?? `multipart/form-data; boundary=${boundary}`,
51 }),
52 body: toWebStream(buildBody(parts, boundary), opts?.chunkSize),
53 }
54}
55
56async function readStream(stream: Readable): Promise<string> {
57 const chunks: Buffer[] = []

Callers 1

multipart.test.tsFile · 0.70

Calls 2

toWebStreamFunction · 0.85
buildBodyFunction · 0.70

Tested by

no test coverage detected