UrlFetchApp
This is the top-level object used to fetch resources from the web.
Methods
Method Name | Return Type | Description |
---|---|---|
fetch(url) | HTTPResponse | Gets a resource from the web. |
fetch(url, params) | HTTPResponse | Lets you manage a web resource. |
getRemainingDailyQuota | int | Gets the remaining number of fetch() calls that the user can make today. |
fetch(string url)
Gets a resource from the web.
This is the equivalent of an HTTP GET request. This method waits until the request completes.
Arguments
Name | Type | Description |
---|---|---|
url | string | The URL of the web resource to get. Supports HTTP and HTTPS requests. The URL may include query parameters. |
Returns
Type | Description |
---|---|
HTTPResponse | Contains the methods for getting the response's payload and status code. |
fetch(string url, UrlFetchParams params)
Lets you manage a web resource.
Use this method to get, post, put, patch or delete a web resource. This method waits until the request completes.
Arguments
Name | Type | Description |
---|---|---|
url | string | The URL of the web resource. |
params | UrlFetchParams | The request's parameters such as its headers, HTTP method, and payload. |
Returns
Type | Description |
---|---|
HTTPResponse | Contains the methods for getting the response's payload and status code. |
GetRemainingDailyQuota
Gets the remaining number of fetch()
calls that the user can make today. See UrlFetch limits.
Returns
Type | Description |
---|---|
int | The remaining number of fetch() calls that the user can make today. |