コード例 #1
0
 public static bool AsyncDelete(HttpDeleteRequest request, Action<string> callBack)
 {
     return AsyncInvoke(request, callBack);
 }
コード例 #2
0
        public void InvokeTest()
        {
            string content;
            string url = "http://localhost:9958/";
            IHttpRequestBase request = new HttpGetRequest(url);
            WebInvoker.Invoke(request, out content);
             
            url = string.Format("http://localhost:9000/addUser");
            HttpFormRequestBase postRequest = new HttpPostRequest(url);
            postRequest.FormParams.Add("name", "Tom");
            postRequest.FormParams.Add("age", "20");
            WebInvoker.Invoke(postRequest, out content);

            url = string.Format("http://localhost:9000/updateUser/{0}", 4);
            HttpFormRequestBase putRequest = new HttpPutRequest(url);
            putRequest.FormParams.Add("name", "ssss");
            putRequest.FormParams.Add("age", "654");
            WebInvoker.Invoke(putRequest, out content);

            url = string.Format("http://localhost:9000/updateUser/{0}", 4);
            HttpFormRequestBase deleteRequest = new HttpDeleteRequest(url);
            WebInvoker.Invoke(deleteRequest, out content);
        }
コード例 #3
0
 public static bool Delete(HttpDeleteRequest request, out byte[] result)
 {
     return Invoke(request, out result);
 }