MCPcopy Create free account
hub / github.com/Effect-TS/effect / fieldsPayload

Function fieldsPayload

packages/effect/benchmark/http/multipart.ts:34–41  ·  view source on GitHub ↗
(fieldCount: number)

Source from the content-addressed store, hash-verified

32}
33
34const fieldsPayload = (fieldCount: number): Array<Uint8Array> => {
35 let out = ""
36 for (let i = 0; i < fieldCount; i++) {
37 out += `--${boundary}\r\ncontent-disposition: form-data; name="field${i}"\r\n\r\nvalue of field number ${i}\r\n`
38 }
39 out += `--${boundary}--\r\n`
40 return [encoder.encode(out)]
41}
42
43const file16MiB64KiB = filePayload(16 * 1024 * 1024, 64 * 1024)
44const file16MiB4KiB = filePayload(16 * 1024 * 1024, 4 * 1024)

Callers 1

multipart.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected