Class HttpAccessTransport
- java.lang.Object
-
- fr.paris.lutece.plugins.notificationstore.v1.web.rs.service.HttpAccessTransport
-
- All Implemented Interfaces:
IHttpTransportProvider
- Direct Known Subclasses:
HttpApiManagerAccessTransport
public class HttpAccessTransport extends Object implements IHttpTransportProvider
IHttpTransportProvider which use library-httpaccess
-
-
Constructor Summary
Constructors Constructor Description HttpAccessTransport()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringdoDelete(String strEndPointUrl, Map<String,String> mapHeadersRequest)make a DELETE request on given url with parametersStringdoGet(String strEndPointUrl, Map<String,String> mapParams, Map<String,String> mapHeadersRequest)make a Get request on given url with parametersStringdoPost(String strEndPointUrl, Map<String,String> mapParams, Map<String,String> mapHeadersRequest)make POST request on given url with params and headersStringdoPostJson(String strEndPointUrl, String json, Map<String,String> mapHeadersRequest)make POST JSON request on given url with json and headersStringdoPut(String strEndPointUrl, Map<String,String> mapParams, Map<String,String> mapHeadersRequest)make Put request on given url with params and headersStringdoPutJson(String strEndPointUrl, String json, Map<String,String> mapHeadersRequest)make Put json request on given url with Json and headersStringgetApiEndPointUrl()get end pointvoidsetApiEndPointUrl(String strApiEndPointUrl)set end point
-
-
-
Method Detail
-
setApiEndPointUrl
public void setApiEndPointUrl(String strApiEndPointUrl)
set end point- Specified by:
setApiEndPointUrlin interfaceIHttpTransportProvider- Parameters:
strApiEndPointUrl-
-
getApiEndPointUrl
public String getApiEndPointUrl()
get end point- Specified by:
getApiEndPointUrlin interfaceIHttpTransportProvider- Returns:
- strEndPointUrl
-
doGet
public String doGet(String strEndPointUrl, Map<String,String> mapParams, Map<String,String> mapHeadersRequest)
Description copied from interface:IHttpTransportProvidermake a Get request on given url with parameters- Specified by:
doGetin interfaceIHttpTransportProvider- Parameters:
strEndPointUrl- urlmapParams- mapParamsmapHeadersRequest- request header- Returns:
- response list
-
doPost
public String doPost(String strEndPointUrl, Map<String,String> mapParams, Map<String,String> mapHeadersRequest)
make POST request on given url with params and headers- Specified by:
doPostin interfaceIHttpTransportProvidermapParams- params to postmapHeadersRequest- headers of the request- Returns:
- response body as String
-
doPostJson
public String doPostJson(String strEndPointUrl, String json, Map<String,String> mapHeadersRequest)
make POST JSON request on given url with json and headers- Specified by:
doPostJsonin interfaceIHttpTransportProviderjson- jsonmapHeadersRequest- headers of the request- Returns:
- response body as String
-
doPut
public String doPut(String strEndPointUrl, Map<String,String> mapParams, Map<String,String> mapHeadersRequest)
make Put request on given url with params and headers- Specified by:
doPutin interfaceIHttpTransportProvidermapParams- params to postmapHeadersRequest- headers of the request- Returns:
- response body as String
-
doPutJson
public String doPutJson(String strEndPointUrl, String json, Map<String,String> mapHeadersRequest)
make Put json request on given url with Json and headers- Specified by:
doPutJsonin interfaceIHttpTransportProviderjson- jsonmapHeadersRequest- headers of the request- Returns:
- response body as String
-
doDelete
public String doDelete(String strEndPointUrl, Map<String,String> mapHeadersRequest)
Description copied from interface:IHttpTransportProvidermake a DELETE request on given url with parameters- Specified by:
doDeletein interfaceIHttpTransportProvider- Parameters:
strEndPointUrl- urlmapHeadersRequest- request header- Returns:
- response list
-
-