Add request to delete body
[vid.git] / vid-app-common / src / main / java / org / onap / vid / client / SyncRestClientInterface.java
1 package org.onap.vid.client;
2
3 import io.joshworks.restclient.http.HttpResponse;
4 import io.joshworks.restclient.http.JsonNode;
5
6 import java.io.InputStream;
7 import java.util.Map;
8
9 public interface SyncRestClientInterface {
10     class HEADERS {
11         public static final String CONTENT_TYPE = "Content-Type";
12         public static final String AUTHORIZATION = "Authorization";
13         public static final String X_ECOMP_INSTANCE_ID = "X-ECOMP-InstanceID";
14     }
15
16     HttpResponse<JsonNode> post(String url, Map<String, String> headers, Object body);
17
18     <T> HttpResponse<T> post(String url, Map<String, String> headers, Object body, Class<T> aClass);
19
20     HttpResponse<JsonNode> get(String url, Map<String, String> headers, Map<String, String> routeParams);
21
22     <T> HttpResponse<T> get(String url, Map<String, String> headers, Map<String, String> routeParams, Class<T> aClass);
23
24     HttpResponse<InputStream> getStream(String url, Map<String, String> headers, Map<String, String> routeParams);
25
26     HttpResponse<JsonNode> put(String url, Map<String, String> headers, Object body);
27
28     <T> HttpResponse<T> put(String url, Map<String, String> headers, Object body, Class<T> aClass);
29
30     <T> HttpResponse<T> delete(String url, Map<String, String> headers, Object body, Class<T> aClass);
31
32     <T> HttpResponse<T> delete(String url, Map<String, String> headers, Class<T> aClass);
33
34     HttpResponse<JsonNode> delete(String url, Map<String, String> headers);
35
36     void destroy();
37
38 }