Class GenericHttpConnector
java.lang.Object
se.swedenconnect.sigval.cert.validity.http.GenericHttpConnector
- Direct Known Subclasses:
DefaultRevocationDataConnector
Generic implementation of HTTP GET and POST to support download of revocation data
- Author:
- Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Trust manager trusting all certificates -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetResource
(URL requestUrl, int connectTimeout, int readTimeout) Get resource from URL using HTTP GETgetResource
(URL requestUrl, int connectTimeout, int readTimeout, byte[] data, Map<String, String> propertyMap) Get resrouce from URL using either GET or POST.
-
Constructor Details
-
GenericHttpConnector
public GenericHttpConnector()
-
-
Method Details
-
getResource
Get resource from URL using HTTP GET- Parameters:
requestUrl
- url for the resourceconnectTimeout
- milliseconds allowed to establish an HTTP connection with the resourcereadTimeout
- milliseconds allowed to download the resource data- Returns:
- response data
-
getResource
public HttpResponse getResource(URL requestUrl, int connectTimeout, int readTimeout, byte[] data, Map<String, String> propertyMap) Get resrouce from URL using either GET or POST. POST is automatically selected if some data to be posted is included as an argument- Parameters:
requestUrl
- url for the resourceconnectTimeout
- milliseconds allowed to establish an HTTP connection with the resourcereadTimeout
- milliseconds allowed to download the resource datadata
- data to be posted or null to select HTTP GETpropertyMap
- map of HTTP connect properties to add to the HTTP connection. The map key is the property name and the map value is the property value- Returns:
- response data
-