我有像下面这样的 PHP 代码,我想编写一个在 C# 中完成相同工作的函数。但是,我不明白 curl_setotp 到底是做什么的。我怎样才能写出这样的函数?
public static function sendDataAuth( $url, $doc,$authData) {
$ch = curl_init($url );
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $doc);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch,CURLOPT_HTTPHEADER,array('OpenPayu-Signature:'.$authData));
$response = curl_exec($ch);
return $response;
}