Net
Lets a plugin fetch from a website. The app checks the permission first, and only https addresses are accepted.
Methods
Section titled “Methods”fetch()
Section titled “fetch()”fetch(url, init?): Promise<NetResponse>;Fetches a URL over https.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
url |
string |
an https address |
init? |
{ body?: string; headers?: Readonly<Record<string, string>>; method?: string; } |
method, headers and body |
init.body? |
string |
- |
init.headers? |
Readonly<Record<string, string>> |
- |
init.method? |
string |
- |
Returns
Section titled “Returns”Promise<NetResponse>
the status, the headers and the body as text
