我需要將下面的curl命令轉換爲java命令。在java中將等同於下面的curl命令
$curl_handle = curl_init();
curl_setopt ($curl_handle, CURLOPT_URL,$url);`enter code here`
curl_setopt ($curl_handle, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt ($curl_handle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($curl_handle, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt ($curl_handle, CURLOPT_POST, 1);
curl_setopt ($curl_handle, CURLOPT_POSTFIELDS, $postfields);
//echo $postfields;
$curl_result = curl_exec ($curl_handle) or die ("There has been a CURL_EXEC error");
你嘗試過什麼嗎? –
@TAsk基本上它發送一個xml字符串來鏈接並得到這個響應 – user3481679