How do I delete something from a server using POST?
I'm new to J2ME. How do I delete something from a server using the POST method? Sample开发者_如何学编程s would be of great help.
Use DELETE method instead
I would recommend Apache HTTPClient. Example
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();
精彩评论