http.put

Sends a HTTP PUT request to any URL using Axios.

Parameters

url: string Target URL
data: any Data to be sent to 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

Update an entity via a REST API
module.exports = async function(payload, actions, context) {
	const { data } = await actions.http.put(
		'http://my.api.com/things/1', 
		{ a: 1 }
	);
  
	console.log('updated a thing with { a: 1 }');
}