Cloudhooks Help

http.patch

Sends a HTTP PATCH request to any URL using Axios.

Parameters

ParameterDescription
url: stringTarget URL
data: anyData to be sent to the 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

Update some fields of an entity via a REST API

module.exports = async function(payload, actions, context) {
	const { data } = await actions.http.patch(
		'http://my.api.com/things/1',
		{ a: 1 }
	);
 
	console.log('partially updated a thing with { a: 1 }', data);
}