コード例 #1
0
ファイル: ruleForm.cs プロジェクト: useppi/certification
        private async void button2_Click_1(object sender, EventArgs e)
        {
            SaveServerParams();

            button2.Text = " loading...";
            var Response = await AlpineBitsRequest.ProcessRequest(myServer, call_actionTextBox.Text, call_paramTextBox.Text);

            AlpineBitsRequest.LogXMLFile(call_paramTextBox.Text, rule_idTextBox.Text + "_" + DateTime.Now.ToString("yyyy_MM_dd_HH_mm_ss") + "_" + call_actionTextBox.Text + "_RQ_");
            string LogPath = AppDomain.CurrentDomain.BaseDirectory + @"\tmp\RQ.xml";

            File.WriteAllText(LogPath, call_paramTextBox.Text);
            label16.Text = await TestingMachine.Call(myServer.X_AlpineBits_ProtocolVersion, LogPath);

            AlpineBitsRequest.LogXMLFile(Response.ResponseBody, rule_idTextBox.Text + "_" + DateTime.Now.ToString("yyyy_MM_dd_HH_mm_ss") + "_" + call_actionTextBox.Text + "_RS_");
            LogPath = AppDomain.CurrentDomain.BaseDirectory + @"\tmp\RS.xml";
            File.WriteAllText(LogPath, Response.ResponseBody);
            label17.Text = await TestingMachine.Call(myServer.X_AlpineBits_ProtocolVersion, LogPath);

            call_resultHeadersTextBox.Text = Response.ResponseHeaders;
            button2.Text = "Process request ...";
            label1.Text  = Response.StatusCode.ToString();
            label14.Text = Response.Encoding.ToString();
            tabControl1.SelectTab(3);
            call_resultTextBox.Text = Response.ResponseBody;
        }
コード例 #2
0
ファイル: ruleForm.cs プロジェクト: useppi/certification
        private async void tabPage3_Enter(object sender, EventArgs e)
        {
            var Response = await AlpineBitsRequest.ProcessRequest(myServer, "getCapabilities", "");

            var capabilities = Response.ResponseBody.Replace("OK:", "").Split(',');

            listBox1.Items.Clear();

            foreach (string item in capabilities)
            {
                listBox1.Items.Add(item);
            }

            Response = await AlpineBitsRequest.ProcessRequest(myServer, "getVersion", "");

            txtServerAction.Text = Response.ResponseBody.Replace("OK:", "");
        }