use of aQute.bnd.http.HttpRequestException in project bnd by bndtools.
the class MavenRemoteRepository method delete.
public boolean delete(String path) throws Exception {
URL url = new URL(base + path);
TaggedData go = client.build().put().delete().get(TaggedData.class).go(url);
if (go == null)
return false;
if (go.getResponseCode() == HttpURLConnection.HTTP_OK || go.getResponseCode() == HttpURLConnection.HTTP_NO_CONTENT) {
client.build().delete().async(new URL(base + path + ".sha1"));
client.build().delete().async(new URL(base + path + ".md5"));
return true;
}
throw new HttpRequestException(go);
}
Aggregations