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

Method formData

packages/platform/node/src/NodeHttpClient.ts:309–321  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

307
308 private formDataBody?: Effect.Effect<FormData, Error.HttpClientError>
309 get formData(): Effect.Effect<FormData, Error.HttpClientError> {
310 return this.formDataBody ??= Effect.tryPromise({
311 try: () => this.source.body.formData() as Promise<FormData>,
312 catch: (cause) =>
313 new Error.HttpClientError({
314 reason: new Error.DecodeError({
315 request: this.request,
316 response: this,
317 cause
318 })
319 })
320 }).pipe(Effect.cached, Effect.runSync)
321 }
322
323 private arrayBufferBody?: Effect.Effect<ArrayBuffer, Error.HttpClientError>
324 get arrayBuffer(): Effect.Effect<ArrayBuffer, Error.HttpClientError> {

Callers 3

formDataMethod · 0.45

Calls 1

pipeMethod · 0.65

Tested by

no test coverage detected