9.0 Released! → Native ESM runtimes 🚀, Vite support ⚡️, multi-window apps and more...
Read Announcement

Call Signature

ts
function getFile(url: string, destinationFilePath?: string): Promise<any>;

Defined in: http/index.d.ts:48

Downloads the content from the specified URL and attempts to save it as file.

Parameters

ParameterTypeDescription
urlstringThe URL to request from.
destinationFilePath?stringOptional. The downloaded file path.

Returns

Promise<any>

Call Signature

ts
function getFile(options: HttpRequestOptions, destinationFilePath?: string): Promise<File>;

Defined in: http/index.d.ts:55

Downloads the content from the specified URL and attempts to save it as file.

Parameters

ParameterTypeDescription
optionsHttpRequestOptionsAn object that specifies various request options.
destinationFilePath?stringOptional. The downloaded file path.

Returns

Promise<File>

Previous
getBinary