http.get

Sends a HTTP GET request to any URL using Axios.

Parameters

url: string The target URL
config?: object Axios HTTP configuration for sending HTTP headers, setting up a proxy, etc. (Optional)

Returns

Promise that is resolved with an Axios response object.

The returned data is in the 'data' property of the response.

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);
}