Interface IHttpTransportProvider
- All Known Implementing Classes:
HttpAccessTransport
public interface IHttpTransportProvider
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionmake 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
-
Field Details
-
HTTP_HEADER_ACCEPT
http constants- See Also:
-
HTTP_HEADER_CONTENT_TYPE
- See Also:
-
HTTP_HEADER_AUTHORIZATION
- See Also:
-
HTTP_HEADER_MEDIATYPE_APPLICATION_FORM_URLENCODED
- See Also:
-
HTTP_HEADER_MEDIATYPE_APPLICATION_JSON
- See Also:
-
HTTP_HEADER_MEDIATYPE_APPLICATION_JSON_UTF8
- See Also:
-
-
Method Details
-
doPost
make POST request on given url with params and headers- Parameters:
strUrl- url to callmapParams- params to postmapHeadersRequest- headers of the request- Returns:
- response body as String
-
doPostJSON
<T> T doPostJSON(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- 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
-