HTTP.REQUEST
Create an HTTP request. Universal function to use for all HTTP methods. Please refer to https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods for more information about the different HTTP methods
Syntax
=HTTP.REQUEST(URL, Method, [Body], [HeadersJSON], [ConfigJSON], [Target])
Arguments
| Name | Type | Description |
|---|---|---|
| URL | String | The URL to request. |
| Method | HttpMethod | The HTTP-method of the request. Options: "GET": Request a specified resource. "DELETE": Delete a specified resource. "HEAD": Analog to GET, but without the response body. "OPTIONS": Use to describe communication options for a specified target resource. "POST": Submit an entity to a specified resource. "PUT": Replace specified target resource with the request payload. "PATCH": Apply partial modifications to a specified resource. |
| Body (optional) | String | The body of the 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 |
|---|---|
| Number | The function HTTP.OPTIONS() always returns a unique random request ID. Otherwise an error is displayed. |
Examples