aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/main/java/org/onap/vid/client/SyncRestClientInterface.java
blob: ae2f8386217c0d87737740135a691f6a42daf1d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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 {
    class HEADERS {
        public static final String CONTENT_TYPE = "Content-Type";
        public static final String AUTHORIZATION = "Authorization";
        public static final String X_ECOMP_INSTANCE_ID = "X-ECOMP-InstanceID";
    }

    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, 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();

}