diff options
author | mmis <michael.morris@ericsson.com> | 2018-08-30 13:34:55 +0100 |
---|---|---|
committer | mmis <michael.morris@ericsson.com> | 2018-08-30 13:39:26 +0100 |
commit | ef849e64bc904f729bace1fb2c43f8cf34de3dd5 (patch) | |
tree | 8879ae092ef1af626bce444fc486fa3076596a99 /policy-endpoints/src/main/java/org/onap/policy/common/endpoints/http/client/HttpClient.java | |
parent | 5443573fe9f8a183f968aa63d08dc3543e73c305 (diff) |
Add support for http PUT
Added support for http PUT for use by the policy forwarder in
policy/distribution
Issue-ID: POLICY-926
Change-Id: Ifa5c2e8be0582797936b95b772ad236f35c10f24
Signed-off-by: mmis <michael.morris@ericsson.com>
Diffstat (limited to 'policy-endpoints/src/main/java/org/onap/policy/common/endpoints/http/client/HttpClient.java')
-rw-r--r-- | policy-endpoints/src/main/java/org/onap/policy/common/endpoints/http/client/HttpClient.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/http/client/HttpClient.java b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/http/client/HttpClient.java index f886e5ca..6e8865f5 100644 --- a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/http/client/HttpClient.java +++ b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/http/client/HttpClient.java @@ -20,6 +20,9 @@ package org.onap.policy.common.endpoints.http.client; +import java.util.Map; + +import javax.ws.rs.client.Entity; import javax.ws.rs.core.Response; import org.onap.policy.common.capabilities.Startable; @@ -30,6 +33,8 @@ public interface HttpClient extends Startable { public Response get(); + public Response put(String path, Entity<?> entity, Map<String, Object> headers); + public static <T> T getBody(Response response, Class<T> entityType) { return response.readEntity(entityType); } @@ -54,4 +59,5 @@ public interface HttpClient extends Startable { public static final HttpClientFactory factory = new IndexedHttpClientFactory(); + } |