delete

string sURL = "<HERE GOES YOUR URL>"; 
 
WebRequest request = WebRequest.Create(sURL); 
request.Method = "DELETE"; 
 
HttpWebResponse response = (HttpWebResponse)request.GetResponse(); 

In the response object you should check the StatusCode property (it should be 200 or 204 if everything goes right, see here for more info).


 

posted @ 2012-08-01 13:12  gitran  阅读(139)  评论(0编辑  收藏  举报