NativeScript 9.1 Released → V8 14.9, Vite 8 HMR, built for rapid agentic visual iteration
Dig in

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