KEYCLOAK-3793 Replace httpclient 4.4 calls with those available in 4.3

This commit is contained in:
Hynek Mlnarik 2016-10-21 11:34:08 +02:00
parent 9c7e9da9fa
commit 8bca84c0e7

View file

@ -36,23 +36,23 @@ public class Http {
} }
public <R> HttpMethod<R> get(String path) { public <R> HttpMethod<R> get(String path) {
return method(RequestBuilder.get(this.serverConfiguration.getIssuer() + path)); return method(RequestBuilder.get().setUri(this.serverConfiguration.getIssuer() + path));
} }
public <R> HttpMethod<R> get(URI path) { public <R> HttpMethod<R> get(URI path) {
return method(RequestBuilder.get(path)); return method(RequestBuilder.get().setUri(path));
} }
public <R> HttpMethod<R> post(URI path) { public <R> HttpMethod<R> post(URI path) {
return method(RequestBuilder.post(path)); return method(RequestBuilder.post().setUri(path));
} }
public <R> HttpMethod<R> post(String path) { public <R> HttpMethod<R> post(String path) {
return method(RequestBuilder.post(this.serverConfiguration.getIssuer() + path)); return method(RequestBuilder.post().setUri(this.serverConfiguration.getIssuer() + path));
} }
public <R> HttpMethod<R> delete(String path) { public <R> HttpMethod<R> delete(String path) {
return method(RequestBuilder.delete(this.serverConfiguration.getIssuer() + path)); return method(RequestBuilder.delete().setUri(this.serverConfiguration.getIssuer() + path));
} }
private <R> HttpMethod<R> method(RequestBuilder builder) { private <R> HttpMethod<R> method(RequestBuilder builder) {