public static bool AsyncDelete(HttpDeleteRequest request, Action<string> callBack) { return AsyncInvoke(request, callBack); }
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); }
public static bool Delete(HttpDeleteRequest request, out byte[] result) { return Invoke(request, out result); }