import { RequestResult } from "https://deno.land/x/dax@0.24.0/mod.ts";
Result of making a request.
Constructors
new
RequestResult(opts: { response: Response; originalUrl: string; progressBar: ProgressBar | undefined; })Methods
formData()
Response body as a form data.
Note: Returns undefined
when .noThrow(404)
and status code is 404.
json<TResult = any>(): Promise<TResult>
Respose body as JSON.
Note: Returns undefined
when .noThrow(404)
and status code is 404.
pipeThrough<T>(transform: { writable: WritableStream<Uint8Array>; readable: ReadableStream<T>; }): ReadableStream<T>
Pipes the response body through the provided transform.
pipeToPath(path?: string | URL | undefined, options?: Deno.WriteFileOptions): Promise<string>
Pipes the response body to a file.