getUrl (Deprecated)
Table of Contents
Note:
- It is recommended to use invoke URL, since this task will be deprecated.
Each time the getUrl task is executed, it triggers an API request to the back-end. This call is deducted from the external calls limit available for the service from which the task is executed, based on your pricing plan.
When using Zoho Creator APIs with in the getUrl task, the limits deducted depend on where the request originates and where it is received.
Outbound request from Creator to an external service - Only the External calls limit is deducted from the Creator account that sends the request.
Inbound request to Creator from an external service - The Developer API limit is deducted from the target Creator account, and the external calls limit is deducted from the service that sends the request.
Internal request within the same Creator account - Both the Developer API limit and the External calls limit are deducted from that Creator account.
Request between two different Creator accounts - The Developer API limit is deducted from the target Creator account, and the External calls limit is deducted from the Creator account that sends the request.
Only actual executions that receive a response (whether success or failure) are counted, not the number of times the task appears in the script. For example, if the task is placed inside a for each task that iterates five times, five external API calls will be consumed, even though the task appears only once in the script.
Overview
The get url deluge task corresponds to a HTTP GET request. It is normally supported by services to perform a read operation like fetching data.
Return Type
- Text
- Key-value
Syntax
| Parameter | Data type | Description |
|---|---|---|
| <variable> | TEXT or KEY-VALUE | Variable which will contain the returned response. |
| <stringUrl> | TEXT | The URL which will return the response. |
<headerMap> (optional) | KEY-VALUE | Variable holding header values as key-value pairs. |
<boolean> (optional) | BOOLEAN | Value 'true' will return a simple response content as text. Value 'false' will return the response code (HTTP status code), and response content as key-value. |
Examples
The following snippet returns the response of the given url:
xmlResp = getUrl("https://www.w3schools.com/xml/cd_catalog.xml");
Response Format
The success response when the third param is set to false will be returned in the following format:
"responseText":
"responseHeader": {
"date": "Fri, 31 Jul 2020 02:47:31 GMT",
"last-modified": "Tue, 14 Feb 2017 13:51:43 GMT",
"server": "ECS (sec/975F)",
"vary": "Accept-Encoding",
"x-frame-options": "SAMEORIGIN",
"x-powered-by": "ASP.NET",
"content-type": "text/xml",
"etag": "\"84e9d179c986d21:0\"",
"x-cache": "HIT",
"accept-ranges": "bytes",
"cache-control": "public,max-age=14400,public",
"age": "8812"
},
"responseCode": 200
}