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

Method formData

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

Source from the content-addressed store, hash-verified

611 }
612
613 get formData(): Effect.Effect<FormData, Error.HttpClientError> {
614 return Effect.tryPromise({
615 try: () => {
616 const init: {
617 headers: HeadersInit
618 status?: number
619 statusText?: string
620 } = {
621 headers: new globalThis.Headers(this.source.headers as any)
622 }
623
624 if (this.source.statusCode) {
625 init.status = this.source.statusCode
626 }
627
628 if (this.source.statusMessage) {
629 init.statusText = this.source.statusMessage
630 }
631
632 return new globalThis.Response(Readable.toWeb(this.source) as any, init).formData()
633 },
634 catch: this.onError
635 })
636 }
637
638 toJSON(): unknown {
639 return IncomingMessage.inspect(this, {

Callers

nothing calls this directly

Calls 1

formDataMethod · 0.45

Tested by

no test coverage detected