예제 #1
0
        private void cmdAPITest_Click(object sender, RoutedEventArgs e)
        {
            string apiUri = String.Format("{0}/api/test/1234?token={1}", baseUri, currentToken);
            HttpAsyncRequest <TestResponseModel> token = new HttpAsyncRequest <TestResponseModel>();

            token.RequestCompleted += HttpRequestCompleted;
            token.SenTo(apiUri, HTTPRequestMethod.HTTPRequestMethod_Get, null);
        }
예제 #2
0
 private void cmdJWT_Click(object sender, RoutedEventArgs e) {
     string tokenUri = String.Format("{0}/token", baseUri);
     var postData = new List<KeyValuePair<string, string>>();
     postData.Add(new KeyValuePair<string, string>("uid", txtUID.Text));
     postData.Add(new KeyValuePair<string, string>("pwd", txtPWD.Text));
     HttpAsyncRequest<TokenResponseModel> token = new HttpAsyncRequest<TokenResponseModel>();
     token.RequestCompleted+=HttpRequestCompleted;
     token.SenTo(tokenUri, HTTPRequestMethod.HTTPRequestMethod_Post, postData);
 }
예제 #3
0
        private void cmdJWT_Click(object sender, RoutedEventArgs e)
        {
            string tokenUri = String.Format("{0}/token", baseUri);
            var    postData = new List <KeyValuePair <string, string> >();

            postData.Add(new KeyValuePair <string, string>("uid", txtUID.Text));
            postData.Add(new KeyValuePair <string, string>("pwd", txtPWD.Text));
            HttpAsyncRequest <TokenResponseModel> token = new HttpAsyncRequest <TokenResponseModel>();

            token.RequestCompleted += HttpRequestCompleted;
            token.SenTo(tokenUri, HTTPRequestMethod.HTTPRequestMethod_Post, postData);
        }
예제 #4
0
 private void cmdAPITest_Click(object sender, RoutedEventArgs e) {
     string apiUri = String.Format("{0}/api/test/1234?token={1}", baseUri,currentToken);
     HttpAsyncRequest<TestResponseModel> token = new HttpAsyncRequest<TestResponseModel>();
     token.RequestCompleted += HttpRequestCompleted;
     token.SenTo(apiUri, HTTPRequestMethod.HTTPRequestMethod_Get, null);
 }