MCPcopy Create free account
hub / github.com/denoland/std / toResponse

Method toResponse

http/unstable_formdata_encoder_stream.ts:236–240  ·  view source on GitHub ↗

* Convert the code FormDataEncoderStream to a code Response to send to a * client. * * @param init Optional response initialization options. * @returns The code Response containing the encoded form data. * * @example Usage * ```ts * import { assert, asser

(init?: ResponseInit)

Source from the content-addressed store, hash-verified

234 * ```
235 */
236 toResponse(init?: ResponseInit): Response {
237 init ??= {};
238 init.headers = { ...init.headers, "Content-Type": this.#contentType };
239 return new Response(this.#readable, init);
240 }
241
242 /**
243 * Convert the {@linkcode FormDataEncoderStream} to a {@linkcode Request} to send to a server.

Calls

no outgoing calls

Tested by

no test coverage detected