Skip to content

request

request(request): Promise<string>

Defined in: obsidian.d.ts:3550

Similar to fetch(), request a URL using HTTP/HTTPS, without any CORS restrictions. Returns the text value of the response.

string | RequestUrlParam

Promise<string>

request(request): Promise<string>

Defined in: src/obsidian/augmentations/functions.d.ts:590

Similar to fetch, request a URL using HTTP/HTTPS, without any CORS restrictions.

The request parameters.

string | RequestUrlParam

Promise<string>

The promise that resolves to the text value of the response.

console.log(await request({ url: 'https://google.com' }));
console.log(await request('https://google.com'));