fetch
Send arbitrary HTTP request to any API using javascript's fetch.
Arguments
| Name | Type | Description |
|---|---|---|
tab | string | The tab to send the request from. Special value `current` can be used to send the request from the current tab. If not set, the request will be sent from the extension environment, without inheriting any cookies or other data from the page. |
url | string | The url to send the request to. |
method | string | The method of the request (GET, POST, PUT, PATCH, DELETE). |
body | any | The body of the request. |
format | string | The format of the body (default: json). |
headers | object | The headers of the request. |
jmespath | string | The jmespath expression to execute on top of the result. |
Output
Type:unknownThe results of the request. If the response is JSON, it will be parsed, and jmespath will be executed on top of it. Otherwise, `string` will be returned.