Hi there,
I am trying to execute a handshake that establishes a webhook on an asana project. Essentially, a Postman monitor is receiving a webhook, and the response back to that webhook needs to include certain headers, and a certain body.
I can’t figure out how to configure the response.
Below is my code. I’m not sure what to use in order to tell postman what to send back
secret = pm.collectionVariables.get(‘secret’)
pm.test(“Status code is 200”, function () {
pm.response.to.have.status(200);
pm.response.headers.add({
key: ‘Content-Type’,
value: ‘application/json’,
key: ‘Accept’,
value: ‘application/json’,
key: ‘X-Hook-Secret’,
value: secret
});
pm.response.body.add({
key: ‘status’,
value: ‘success’
});
});
postman.setNextRequest(null);