response.js(optional)
response.js
is configuration of JavaScript logic to respond when event requested.
With input
variable, user can create their own logic for response.
If there is no response.js
, 200 OK will be responded.
Example response.js
try {
const validationToken = input.notification.params.query.validationToken
if (validationToken) {
return validationToken
} else {
return {}
}
} catch (error) {
console.error('Error parsing request:', error);
throw error;
}
Helpful?