Invoking HTTP requests

This is used to make https calls.

Snippet

sdk.request({
	url,
	connectionLinkName,
	method,
	payload,
	parameters,
	headers,
	uploadfile
}).then((response)=>{});
KeyTypeDescriptionValue
urlURLThe URL to make an API request.It is a mandatory parameter. Provide a URL in the field.
connectionLinkNameStringConnection Link Name of the connection. Used for authorization.It is a mandatory parameter. Use the connection link name as mention in the plugin-manifest.json
methodStringProvide the API request method.

Supported methods:

  • get
  • post
  • put
  • patch
  • delete
payloadStringPayload for the API requestIt is not mandatory
parametersStringParameters for the API requestIt is not mandatory
headersStringHeaders for the API requestIt is not mandatory
uploadfileFileYou can send files in the API request. Up to 5 files each having a maximum of 10 MB can be uploaded.It is not mandatory

 

Sample respones

{
	"responseBody": {
		"data": {
			"attachments": [
				{
					"open_url": "https://writer.zoho.com/writer/open/nuvf*******822"
				}
			]
	},
		"ETag": "e90b353ee389a85471306ea81786c709",
		"status": "success"
	},
		"responseHeaders": {
			"date": "Fri, 29 Dec 2023 12:56:33 GMT",
			"content-length": "176",
			"expires": "Thu, 01 Jan 1970 00:00:00 GMT",
			"x-rate-limit": "[{\"duration\":300,\"remaining-count\":294}]",
			"x-frame-options": "DENY",
			"x-download-options": "noopen",
			"pragma": "no-cache",
			"strict-transport-security": "max-age=63072000",
			"x-content-type-options": "nosniff",
			"content-disposition": "attachment; filename=response.json;",
			"x-robots-tag": "noindex, nofollow, noarchive, nosnippet",
			"content-type": "application/json;charset=UTF-8",
			"connection": "keep-alive",
			"etag": "e90b353ee389a85471306ea81786c709",
			"cache-control": "private,no-cache,no-store,max-age=0,must-revalidate",
			"content-language": "en-US"
	},
	"responseCode": 200,
	"status": "success"
}