For me it gives...
<http:response xmlns:http="http://expath.org/ns/http-client" status="400" message="Bad Request">
<http:header name="Server" value="nginx/1.11.5"/>
<http:header name="Access-Control-Allow-Origin" value="*"/>
<http:header name="Connection" value="keep-alive"/>
<http:header name="Content-Length" value="37"/>
<http:header name="Date" value="Mon, 14 Aug 2017 18:45:48 GMT"/>
<http:header name="Content-Type" value="text/plain"/>
<http:body media-type="text/plain"/>
</http:response>
Required argument 'data' is missing.
I think the below should work, but it does not
let $d:="Děti pojedou k babičce. Už se těší"
return http:send-request(<http:request method='POST' href='http://lindat.mff.cuni.cz/services/udpipe/api/process'>
<http:body media-type ="application/x-www-form-urlencoded">data={encode-for-uri($d)}&tokenizer&tagger&parser</http:body>
</http:request>)
returns:
<http:response xmlns:http="http://expath.org/ns/http-client" status="400" message="Bad Request">
<http:header name="Server" value="nginx/1.11.5"/>
<http:header name="Access-Control-Allow-Origin" value="*"/>
<http:header name="Connection" value="keep-alive"/>
<http:header name="Content-Length" value="113"/>
<http:header name="Date" value="Mon, 14 Aug 2017 18:47:32 GMT"/>
<http:header name="Content-Type" value="text/plain"/>
<http:body media-type="text/plain"/>
</http:response>
Cannot read input data: The CoNLL-U line 'Děti pojedou k babičce. Už se těší' does not contain 10 columns!
Trying to directly emulate curl
let $target:="http://lindat.mff.cuni.cz/services/udpipe/api/process"
let $data:="Děti pojedou k babičce. Už se těší"
let $req:= <http:request method="POST" xmlns="http://expath.org/ns/http-client">
<multipart media-type="multipart/form-data">
<header name="Content-Disposition" value='form-data; name="tokenizer"'/>
<body media-type="text/plain"/>
<header name="Content-Disposition" value='form-data; name="tagger"'/>
<body media-type="text/plain"/>
<header name="Content-Disposition" value='form-data; name="parser"'/>
<body media-type="text/plain"/>
<header name="Content-Disposition" value='form-data; name="data"'/>
<header name="Content-Transfer-Encoding" value='binary'/>
<body media-type="text/plain" />
</multipart>
</http:request>
return http:send-request($req,$target,("","","",($data)))
This works, except when $data contains non 7bit chars, as here.
In this case base64 data appears in place of the correct text.
/Andy