初始化CRICS
This commit is contained in:
27
WebSite/Models/FCS.cs
Normal file
27
WebSite/Models/FCS.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using RestSharp;
|
||||
|
||||
namespace WebSite.Models
|
||||
{
|
||||
public class FCS
|
||||
{
|
||||
public static string FCSLoginUrl = "https://api.fcs1cloud.com/api/security/authenticate";
|
||||
public void Login()
|
||||
{
|
||||
string str = Newtonsoft.Json.JsonConvert.SerializeObject("");
|
||||
var client1 = new RestClient(FCSLoginUrl);
|
||||
var request1 = new RestRequest("/", Method.POST);
|
||||
|
||||
//注意方法是POST
|
||||
//两个参数名字必须是 topic 和payload ,区分大小写的
|
||||
request1.AddParameter("topic", "");
|
||||
request1.AddParameter("payload", str);
|
||||
|
||||
|
||||
client1.ExecuteAsync(request1, (response) => { });
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user