public class TimeStampSimpleHttpClient extends Object implements TimeStampHttpClient
| Modifier and Type | Class and Description |
|---|---|
protected static interface |
TimeStampSimpleHttpClient.MethodHandler |
TimeStampHttpClient.TimeStampHttpClientResponse| Modifier and Type | Field and Description |
|---|---|
protected static String |
BASIC_AUTH |
protected SignatureConfig |
config |
protected static String |
CONTENT_TYPE |
protected String |
contentTypeOut |
protected boolean |
followRedirects |
protected Map<String,String> |
header |
protected boolean |
ignoreHttpsCertificates |
protected Proxy |
proxy |
protected static String |
REDIRECT_LOCATION |
protected static String |
USER_AGENT |
| Constructor and Description |
|---|
TimeStampSimpleHttpClient() |
protected static final String CONTENT_TYPE
protected static final String USER_AGENT
protected static final String BASIC_AUTH
protected static final String REDIRECT_LOCATION
protected SignatureConfig config
protected Proxy proxy
protected String contentTypeOut
protected boolean ignoreHttpsCertificates
protected boolean followRedirects
public static void setMaxTimestampResponseSize(int maxTimestampResponseSize)
maxTimestampResponseSize - the max timestamp response size allowedpublic static int getMaxTimestampResponseSize()
public void init(SignatureConfig config)
init in interface TimeStampHttpClientpublic void setProxy(String proxyUrl)
public Proxy getProxy()
public void setContentTypeIn(String contentType)
TimeStampHttpClientsetContentTypeIn in interface TimeStampHttpClientpublic void setContentTypeOut(String contentType)
TimeStampHttpClientnull if contentType is ignoredsetContentTypeOut in interface TimeStampHttpClientpublic void setBasicAuthentication(String username, String password)
setBasicAuthentication in interface TimeStampHttpClientpublic boolean isIgnoreHttpsCertificates()
isIgnoreHttpsCertificates in interface TimeStampHttpClientpublic void setIgnoreHttpsCertificates(boolean ignoreHttpsCertificates)
setIgnoreHttpsCertificates in interface TimeStampHttpClientignoreHttpsCertificates - set if the connection is reckless ignoring all https certificate trust issuespublic boolean isFollowRedirects()
isFollowRedirects in interface TimeStampHttpClientpublic void setFollowRedirects(boolean followRedirects)
setFollowRedirects in interface TimeStampHttpClientfollowRedirects - set if http redirects are followed oncepublic TimeStampHttpClient.TimeStampHttpClientResponse post(String url, byte[] payload) throws IOException
post in interface TimeStampHttpClientIOExceptionpublic TimeStampHttpClient.TimeStampHttpClientResponse get(String url) throws IOException
get in interface TimeStampHttpClientIOExceptionprotected TimeStampHttpClient.TimeStampHttpClientResponse handleRedirect(String url, TimeStampSimpleHttpClient.MethodHandler handler, boolean followRedirect) throws IOException
IOExceptionprotected void recklessConnection(HttpURLConnection conn) throws IOException
IOException