Class RestUtil
- java.lang.Object
-
- io.mosip.kernel.packetmanager.util.RestUtil
-
public class RestUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description RestUtil()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> TgetApi(URI uri, Class<?> responseType)org.springframework.web.client.RestTemplategetRestTemplate()StringgetToken()<T> TpostApi(String uri, org.springframework.http.MediaType mediaType, Object requestType, Class<?> responseClass)
-
-
-
Method Detail
-
postApi
public <T> T postApi(String uri, org.springframework.http.MediaType mediaType, Object requestType, Class<?> responseClass) throws ApiNotAccessibleException
- Throws:
ApiNotAccessibleException
-
getApi
public <T> T getApi(URI uri, Class<?> responseType) throws ApiNotAccessibleException
- Throws:
ApiNotAccessibleException
-
getRestTemplate
public org.springframework.web.client.RestTemplate getRestTemplate() throws KeyManagementException, NoSuchAlgorithmException, KeyStoreException
-
getToken
public String getToken() throws IOException
- Throws:
IOException
-
-