Question: How do you make an HTTP POST request to an external service within Exist DB, ideally using just XQuery?
Motivation: I want to take a set of XML documents in Exist DB, and send each to an external server for processing, then I want to receive the result, and store them back in Exist DB.
I can accomplish this with an external script that interacts with the Exist DB REST interface, but I would like to it all within Exist DB and XQuery. Marklogic has a http request function that does POST requests under the xdmp
namespace, which seems to accomplish this. Does something similar exist for Exist-DB?
Bonus points if the request body can be sent in JSON format.