Skip to content

Instantly share code, notes, and snippets.

@frankkienl
Created March 18, 2014 09:47
Show Gist options
  • Save frankkienl/9616844 to your computer and use it in GitHub Desktop.
Save frankkienl/9616844 to your computer and use it in GitHub Desktop.
HttpDelete on Android
import java.net.URI;
import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;
/**
* http://stackoverflow.com/questions/3773338/httpdelete-with-body
* @author fbouwens
*/
class HttpDeleteWithBody extends HttpEntityEnclosingRequestBase {
public static final String METHOD_NAME = "DELETE";
@Override
public String getMethod() {
return METHOD_NAME;
}
public HttpDeleteWithBody(final String uri) {
super();
setURI(URI.create(uri));
}
public HttpDeleteWithBody(final URI uri) {
super();
setURI(uri);
}
public HttpDeleteWithBody() {
super();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment