async Task StartLogin() { if (IsBusy) { return; } IsBusy = true; try { // var items = await DataStore.GetItemsAsync(true); RestSharp.Http http = new RestSharp.Http(); http.Url.AbsoluteUri = App.SpotURL; http.Parameters.Add(new RestSharp.HttpParameter("SessionID", "Test")); http.Parameters.Add(new RestSharp.HttpParameter("Username", "Test")); await http.PostAsync(loginResponse); } catch (Exception ex) { Debugger.Log(0, "Login", ex.ToString()); } finally { IsBusy = false; } }
public void GetIotCard() { //用户code码 var entCode = "085458"; //用户密码 var secret = "2E1B811F701F3C7CEFD031689FE82924"; //物联卡基本信息(可用) var API_IotCardInfoApi = "http://wl.51liubei.com/dhApi/iotCardInfoApi.api"; var iccid = "8986031746202530209Y"; RestSharp.Http http = new RestSharp.Http(); StringBuilder url = new StringBuilder(API_IotCardInfoApi); url.Append("entCode=").Append(entCode).Append("&secret=").Append(secret) .Append("&iccid=").Append(iccid).Append("&access_token="); //.Append(MD5.getAccessToken(Constants.entCode, Constants.secret)); //http.Url = new Uri(); http.Get(); }