Package co.privacyone.sdk.restapi.rest
Class RestApi
java.lang.Object
co.privacyone.sdk.restapi.rest.RestApi
- Direct Known Subclasses:
RestClient
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionokhttp3.Responseokhttp3.Responseokhttp3.Responseokhttp3.Responseokhttp3.Response
-
Field Details
-
SC_UNAUTHORIZED
public static int SC_UNAUTHORIZED
-
-
Constructor Details
-
RestApi
public RestApi()
-
-
Method Details
-
head
public okhttp3.Response head(okhttp3.HttpUrl url, Optional<okhttp3.Headers> headers) throws RemoteServiceException - Throws:
RemoteServiceException
-
get
public okhttp3.Response get(okhttp3.HttpUrl url, Optional<okhttp3.Headers> headers) throws RemoteServiceException - Throws:
RemoteServiceException
-
post
public okhttp3.Response post(okhttp3.HttpUrl url, okhttp3.RequestBody requestBody, Optional<okhttp3.Headers> headers) throws RemoteServiceException - Throws:
RemoteServiceException
-
delete
public okhttp3.Response delete(okhttp3.HttpUrl url, Optional<okhttp3.Headers> headers, @Nullable okhttp3.RequestBody requestBody) throws RemoteServiceException - Throws:
RemoteServiceException
-
put
public okhttp3.Response put(okhttp3.HttpUrl url, okhttp3.RequestBody requestBody, Optional<okhttp3.Headers> headers) throws RemoteServiceException - Throws:
RemoteServiceException
-