Class HttpAccessTransport
java.lang.Object
fr.paris.lutece.plugins.identitystore.v1.web.service.HttpAccessTransport
- All Implemented Interfaces:
IHttpTransportProvider
IHttpTransportProvider which use library-httpaccess
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> TdoDelete(String strEndPointUrl, Map<String, String> mapParams, Map<String, String> mapHeadersRequest, Class<T> responseJsonClass, com.fasterxml.jackson.databind.ObjectMapper mapper) make a Delete request on given url with parameters<T> TdoGet(String strEndPointUrl, Map<String, String> mapParams, Map<String, String> mapHeadersRequest, Class<T> responseJsonClass, com.fasterxml.jackson.databind.ObjectMapper mapper) make a Get request on given url with parametersmake POST request on given url with params and headers<T> TdoPostJSON(String strUrl, Map<String, String> mapParams, Map<String, String> mapHeadersRequest, Object json, Class<T> responseJsonClass, com.fasterxml.jackson.databind.ObjectMapper mapper) make POST request on given url with params and headers of a JSON object to retrieve another JSON<T> TdoPostMultiPart(String strEndPointUrl, Map<String, String> mapParams, Map<String, String> mapHeadersRequest, Map<String, org.apache.commons.fileupload.FileItem> mapFiles, Class<T> responseJsonClass, com.fasterxml.jackson.databind.ObjectMapper mapper) make a multipart Post request
-
Constructor Details
-
HttpAccessTransport
public HttpAccessTransport()
-
-
Method Details
-
doPost
public String doPost(String strUrl, Map<String, String> mapParams, Map<String, throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreExceptionString> mapHeadersRequest) make POST request on given url with params and headers- Specified by:
doPostin interfaceIHttpTransportProvider- Parameters:
strUrl- url to callmapParams- params to postmapHeadersRequest- headers of the request- Returns:
- response body as String
- Throws:
fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
-
doPostJSON
public <T> T doPostJSON(String strUrl, Map<String, String> mapParams, Map<String, throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreExceptionString> mapHeadersRequest, Object json, Class<T> responseJsonClass, com.fasterxml.jackson.databind.ObjectMapper mapper) make POST request on given url with params and headers of a JSON object to retrieve another JSON- Specified by:
doPostJSONin interfaceIHttpTransportProvider- Type Parameters:
T- of the response- Parameters:
strUrl- url to callmapParams- params to postmapHeadersRequest- headers of the requestjson- JSON object to postresponseJsonClass- the classmapper- mapper for JSON serialize / deserialize- Returns:
- response T
- Throws:
fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
-
doGet
public <T> T doGet(String strEndPointUrl, Map<String, String> mapParams, Map<String, throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreExceptionString> mapHeadersRequest, Class<T> responseJsonClass, com.fasterxml.jackson.databind.ObjectMapper mapper) Description copied from interface:IHttpTransportProvidermake a Get request on given url with parameters- Specified by:
doGetin interfaceIHttpTransportProvider- Type Parameters:
T- of the response- Parameters:
strEndPointUrl- urlmapParams- param to add to urlmapHeadersRequest- request headerresponseJsonClass- the classmapper- mapper for JSON serialize / deserialize- Returns:
- response list
- Throws:
fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
-
doPostMultiPart
public <T> T doPostMultiPart(String strEndPointUrl, Map<String, String> mapParams, Map<String, throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreExceptionString> mapHeadersRequest, Map<String, org.apache.commons.fileupload.FileItem> mapFiles, Class<T> responseJsonClass, com.fasterxml.jackson.databind.ObjectMapper mapper) Description copied from interface:IHttpTransportProvidermake a multipart Post request- Specified by:
doPostMultiPartin interfaceIHttpTransportProvider- Type Parameters:
T- of the response- Parameters:
strEndPointUrl- urlmapParams- param to add to requestmapHeadersRequest- request headermapFiles- file to add to multipart requestresponseJsonClass- the classmapper- mapper for JSON serialize / deserialize- Returns:
- response list
- Throws:
fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
-
doDelete
public <T> T doDelete(String strEndPointUrl, Map<String, String> mapParams, Map<String, throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreExceptionString> mapHeadersRequest, Class<T> responseJsonClass, com.fasterxml.jackson.databind.ObjectMapper mapper) Description copied from interface:IHttpTransportProvidermake a Delete request on given url with parameters- Specified by:
doDeletein interfaceIHttpTransportProvider- Type Parameters:
T- of the response- Parameters:
strEndPointUrl- urlmapParams- param to add to urlmapHeadersRequest- request headerresponseJsonClass- the classmapper- mapper for JSON serialize / deserialize- Returns:
- response list
- Throws:
fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
-