public void TestSendJsonAsync() { string url = "http://localhost:41916/default3.aspx"; var sender = new HttpSender(url, new TestData("test1", 100)); sender.AsyncGetResponseCallBack += sender_AsyncGetResponseCallBack; var strResponse = sender.GetResponseAsync(); Console.Read(); }
public void TestSendPostAsync() { string url = "http://localhost:41916/default3.aspx"; var sender = new HttpSender(url, new Dictionary<string, string>() { { "name", "mika" } }, HttpMethod.POST); sender.AsyncGetResponseCallBack += sender_AsyncGetResponseCallBack; var strResponse = sender.GetResponseAsync(); Console.Read(); }
public void TestSendGetAsync() { string url = "http://www.baidu.com"; var sender = new HttpSender(url, new Dictionary<string, string>() { { "name", "mika" } }); sender.AsyncGetResponseCallBack += sender_AsyncGetResponseCallBack; var strResponse = sender.GetResponseAsync(); Console.Read(); }
void sender_AsyncGetResponseCallBack(HttpSender arg1, string arg2) { }
public void TestSendJson() { string url = "http://localhost:41916/default3.aspx"; var sender = new HttpSender(url, new TestData("test1", 100)); var strResponse = sender.GetResponse(); }
public void TestSendPost() { string url = "http://localhost:41916/default3.aspx"; var sender = new HttpSender(url, new Dictionary<string, string>() { { "name", "mika" } }, HttpMethod.POST); var strResponse = sender.GetResponse(); }
public void TestSendGet() { string url = "http://www.baidu.com"; var sender = new HttpSender(url, new Dictionary<string, string>() { {"name", "mika"} }); var strResponse = sender.GetResponse(); }