In my XPages application I have to call curl commands
The code is simple:
public static InputStream executeCurlCommand(String finalCurlCommand) throws IOException
{
return Runtime.getRuntime().exec(finalCurlCommand).getInputStream();
}
However, it seems that the command isn't executed at all.
When I execute the following (in Linux terminal):
curl -k -i -X GET https://someHost/fws/api/esia/login?redirectUrl=https://redirectHost/sed/gecho/2019/gecho_apps_2019.nsf/Nav2.xsp
I get the output.
But whenever I execute it with Java nothing works. getInputStream()
is empty.
At the same time, if I execute this code on my local Windows machine everything is fine. Same goes for the command executed from cmd.
But in XPages there are no exceptions, no errors, just nothing.
Is there a way to debug it?
UPD
If I change the command to something as simple as ls -la
everything works fine :x