POST request from Sync Gateway

I’ve been trying to set up a new system that requires data syncing amongst devices and servers. Everything works fine so far. But I have a new requirement that needs me to record changes in a queue system.

I have noticed that the Sync Gateway has a ‘sync’ function that allows to perform javascript code on a document synced to the Gateway. Is it possible to make a POST request to a service from there?

This documentation should help you

Another question: The event_handler lets me post the document to a URL. But I need to POST the document’s ID as the request’s body. Is that possible?