diff options
author | 2018-08-23 11:31:48 +0000 | |
---|---|---|
committer | 2018-08-23 11:31:48 +0000 | |
commit | 5adc0b0ee92d1e39ddaacd27e67a327dd5988f11 (patch) | |
tree | bbb51070fd9996ca9e3e5ef85c029aa2da693782 /vid-app-common/src/main/java/org/onap/vid/client/SyncRestClientInterface.java | |
parent | eea1c99fcc1ec5a0587f60fe7ac5ba96e186ca81 (diff) | |
parent | 985bc34c7519ae45adf464d68315f06972152d0e (diff) |
Merge "Generic REST client for external services"
Diffstat (limited to 'vid-app-common/src/main/java/org/onap/vid/client/SyncRestClientInterface.java')
-rw-r--r-- | vid-app-common/src/main/java/org/onap/vid/client/SyncRestClientInterface.java | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/client/SyncRestClientInterface.java b/vid-app-common/src/main/java/org/onap/vid/client/SyncRestClientInterface.java new file mode 100644 index 00000000..80663d65 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/client/SyncRestClientInterface.java @@ -0,0 +1,30 @@ +package org.onap.vid.client; + +import io.joshworks.restclient.http.HttpResponse; +import io.joshworks.restclient.http.JsonNode; +import java.io.InputStream; +import java.util.Map; + +public interface SyncRestClientInterface { + + HttpResponse<JsonNode> post(String url, Map<String, String> headers, Object body); + + <T> HttpResponse<T> post(String url, Map<String, String> headers, Object body, Class<T> aClass); + + HttpResponse<JsonNode> get(String url, Map<String, String> headers, Map<String, String> routeParams); + + <T> HttpResponse<T> get(String url, Map<String, String> headers, Map<String, String> routeParams, Class<T> aClass); + + HttpResponse<InputStream> getStream(String url, Map<String, String> headers, Map<String, String> routeParams); + + HttpResponse<JsonNode> put(String url, Map<String, String> headers, Object body); + + <T> HttpResponse<T> put(String url, Map<String, String> headers, Object body, Class<T> aClass); + + <T> HttpResponse<T> delete(String url, Map<String, String> headers, Class<T> aClass); + + HttpResponse<JsonNode> delete(String url, Map<String, String> headers); + + void destroy(); + +} |