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

Method toRequest

http/unstable_formdata_encoder_stream.ts:269–274  ·  view source on GitHub ↗

* Convert the code FormDataEncoderStream to a code Request to send to a server. * * @param input The URL or RequestInfo to send the request to. * @param init Optional request initialization options. * @returns The code Request containing the encoded form data. *

(input: RequestInfo | URL, init?: RequestInit)

Source from the content-addressed store, hash-verified

267 * ```
268 */
269 toRequest(input: RequestInfo | URL, init?: RequestInit): Request {
270 init ??= {};
271 init.headers = { ...init.headers, "Content-Type": this.#contentType };
272 init.body = this.#readable;
273 return new Request(input, init);
274 }
275
276 /**
277 * Create a {@linkcode FormDataEncoderStream} from a

Calls

no outgoing calls

Tested by

no test coverage detected