Package io.mosip.pms.common.util
Class RestUtil
- java.lang.Object
-
- io.mosip.pms.common.util.RestUtil
-
@Component 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(String apiName, List<String> pathsegments, String queryParamName, String queryParamValue, Class<?> responseType)<T> TgetApi(String apiUrl, Map<String,String> pathsegments, Class<?> responseType)org.springframework.web.client.RestTemplategetRestTemplate()StringgetToken()<T> TpostApi(String apiUrl, List<String> pathsegments, String queryParamName, String queryParamValue, org.springframework.http.MediaType mediaType, Object requestType, Class<?> responseClass)
-
-
-
Method Detail
-
postApi
public <T> T postApi(String apiUrl, List<String> pathsegments, String queryParamName, String queryParamValue, org.springframework.http.MediaType mediaType, Object requestType, Class<?> responseClass)
-
getApi
public <T> T getApi(String apiName, List<String> pathsegments, String queryParamName, String queryParamValue, Class<?> responseType)
-
getRestTemplate
public org.springframework.web.client.RestTemplate getRestTemplate() throws KeyManagementException, NoSuchAlgorithmException, KeyStoreException
-
getToken
public String getToken() throws IOException
- Throws:
IOException
-
-