2011-04-09 61 views

回答

0

使用DELETE方法,而不是

我會建議Apache HTTPClient。 示例

URL url = new URL("http://www.example.com/resource"); 
HttpURLConnection httpCon = (HttpURLConnection) url.openConnection(); 
httpCon.setDoOutput(true); 
httpCon.setRequestProperty(
    "Content-Type", "application/x-www-form-urlencoded"); 
httpCon.setRequestMethod("DELETE"); 
httpCon.connect(); 
相關問題