Hi, look at [1]. This is the documentation of the http client available in BaseX following eXpath specification in [2]. Your request in particularly should look like: http:send-request(<http:request method="POST"/>, "http://address", "my text is long") or more declaratively: http:send-request( <http:request method="POST" href="http://address"> <http:body media-type="text/plain">My text is long</http:body> </http:request> ) BR, Marco. [1] http://docs.basex.org/wiki/HTTP_Module#http:send-request [2] http://expath.org/spec/http-client ________________________________________ From: basex-talk-bounces@mailman.uni-konstanz.de <basex-talk-bounces@mailman.uni-konstanz.de> on behalf of meumapple <meumapple@gmail.com> Sent: Saturday, November 14, 2015 10:51 PM To: BaseX Subject: [basex-talk] Restxq Hi All, I am using restxq. I wrote a function which takes one variable (this should be a chunk of text, not a single word). The output is xml. I can have the function work if I pass the content of the variable with curl -X POST --data "variable=my text is long" http://address How can I get the same result of the curl command with an xquery function? More in general, is this a good way to write a function in restxq when the variable is not a single word but the content of a file? (I am not even sure if a file can be passed as such in restxq) Thanks, Joseph