Cloudhooks Help

http.get

Sends a HTTP GET request to any URL using Axios.

Parameters

ParameterDescription
url: stringThe target URL
config?: objectAxios HTTP configuration for sending HTTP headers, setting up a proxy, etc. (Optional)

Returns

Promise resolved with an object containing status, statusText, headers, and data from the Axios response. The response body is in data.

Examples

Retrieve an entity from a REST endpoint

module.exports = async function(payload, actions, context) {
	const { data } = await actions.http.get(
		'http://my.api.com/thing/1'
	);
 
	console.log('do something with thing 1', data);
}