我试图通过java的Runtime从java进行curl POST。当我使用命令“curl -vF etc”运行shell脚本时,代码按预期运行,但如果我尝试将命令作为正确转义的字符串拉入java,则会出现以下异常/错误 libcurlcurl“”
中不支持或禁用“协议”httpString cmd = "./go.sh";
Process process = Runtime.getRuntime().exec(cmd);
//etc...
VS
String cmd = "curl -vF etc";//found in go.sh
Process process = Runtime.getRuntime().exec(cmd);
//etc...
输出
"Curl Executed Correctly"
//proprietary
VS
* Protocol "http not supported or disabled in libcurlcurl: (1) Protocol "http not supported or disabled in libcurl