I am using the Text Analytics service (find the language) of the Azure portal and a Windows batch script with Curl which is sending JSON data:
The following Windows batch script using curl
and the --data
option works:
set data="{'documents':[{'id':1,'text':'your are my guest'}]}"
curl -X POST %endpoint% ^
-H "Content-Type: application/json" ^
--data %data%
However, it does not work when I want to use the --data-urlencode
option with the same code.
The output error is:
Request body must be present
I have tried many things (double quote, escape, and so on), but nothing works.
Some ideas?