1 31 32 package org.apache.commons.httpclient.methods; 33 34 import org.apache.commons.httpclient.HttpUrlMethod; 35 import org.apache.commons.httpclient.util.URIUtil; 36 37 import java.net.MalformedURLException ; 38 39 47 public class UrlDeleteMethod extends DeleteMethod implements HttpUrlMethod { 48 49 51 private String url; 52 53 56 public UrlDeleteMethod() { 57 super(); 58 } 59 60 61 66 public UrlDeleteMethod(String url) throws MalformedURLException { 67 super(URIUtil.getPath(url)); 68 setUrl(url); 69 } 70 71 79 public void setUrl(String url) throws MalformedURLException { 80 setPath(URIUtil.getPath(url)); 81 this.url = url; 82 String query = URIUtil.getQuery(url); 83 if (query != null && query.length() > 0) { 84 super.setQueryString(query); 85 } 86 } 87 88 92 public String getUrl() { 93 return url; 94 } 95 96 } 97 | Popular Tags |