HTTP.HEAD
Send an HTTP HEAD request. Please refer to https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods for more information about the different HTTP methods
Syntax
=HTTP.HEAD(URL, [HeadersJSON], [ConfigJSON], [Target])
Arguments
| Name | Type | Description |
|---|---|---|
| URL | String | The URL to request. |
| HeadersJSON (optional) | JSON | Headers of the HTTP request. |
| ConfigJSON (optional) | JSON | A JSON with one or more of the following properties:
|
| Target (optional) | Target | INBOX(), OUTBOX("MsgID") or a cell range where the result will be placed. Make sure the cell range is big enough or not everything is displayed. |
Return
| Type | Description |
|---|---|
| HTTP Response or Error | The function HTTP.HEAD() returns a HTTP response JSON. Otherwise an error is displayed. |
Examples
| A | B | |
|---|---|---|
| 1 | Headers | |
| 2 | Accept | application/json |
| 3 | Config | |
| 4 | timeout | 3000 |
Examples for using the config and header parameter. Use a JSON() function around the cell ranges.
| Formula | Result | Comment |
|---|---|---|
| Sends a HEAD Request to the API | |
| Sends a HEAD Request to the API | Use the "Accept: application/json" header and a timeout of 3 seconds for the request. |
| Sends a HEAD Request to the API | The HTTP response is placed into the inbox of "Sheet1" |