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

Call Signature

ts
function getString(url: string): Promise<string>;

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

Downloads the content from the specified URL as a string.

Parameters

ParameterTypeDescription
urlstringThe URL to request from.

Returns

Promise<string>

Call Signature

ts
function getString(options: HttpRequestOptions): Promise<string>;

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

Downloads the content from the specified URL as a string.

Parameters

ParameterTypeDescription
optionsHttpRequestOptionsAn object that specifies various request options.

Returns

Promise<string>

Previous
getJSON