データ期間= 300のhttps投稿を作成しようとしています。私はC#を初めて使用しており、Crestron Simpl#と呼ばれる別のプログラムのサンドボックスに書き込んでいます。誰かがポストにデータを追加する正しい方向に私を向けるのを助けることができたら。ありがとうC#VS2008 HttpsClient投稿データの使用方法
public void post(String postVar)
{
try
{
var httpsSet = new HttpsClient();
httpsSet.KeepAlive = false;
httpsSet.Accept = "application/xml";
httpsSet.UserName = username;
httpsSet.Password = password;
httpsSet.HostVerification = false;
httpsSet.PeerVerification = false;
HttpsClientRequest sRequest = new HttpsClientRequest();
sRequest.RequestType = RequestType.Post;
sRequest.Url.Parse("https://" + ipaddress + postVar);
HttpsClientResponse response = httpsSet.Dispatch(sRequest);
string responseRx = response.ContentString;
ushort iRepsonse = myRx(responseRx);
}
catch (Exception e)
{
CrestronConsole.PrintLine(String.Format("{0} exception", e.Message));
}
}
は「HttpsClient」とは何ですか? –
これは、Httpsを扱うCrestron Sandboxesの方法です。 –
おそらくこれについて聞いたことはありません。https://www.crestron.com/reference/simpl_sharp/html/M_Crestron_SimplSharp_Net_Https_HttpsClient_PostAsync.htm –