以下に示すようなPHPコードがあり、接続を確立して(Webサービスから)応答を取得します。
Pythonで同様のことを行うにはどうすればよいですか?
$cObj = curl_init();.
curl_setopt($cObj, CURLOPT_URL,$this->urlws.'/trlink/link1/trlink');
curl_setopt($cObj, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($cObj, CURLOPT_TIMEOUT, 20);
curl_setopt($cObj, CURLOPT_HTTPHEADER, array());
curl_setopt($cObj, CURLOPT_POST, 1);
curl_setopt($cObj, CURLOPT_POSTFIELDS,"XMLString=".$xml);
$this->xml_response = curl_exec($cObj);.