Package org.xipki.util.http
Class XiHttpClient
- java.lang.Object
-
- org.xipki.util.http.XiHttpClient
-
public class XiHttpClient extends Object
The HTTP client.- Author:
- Lijun Liao (xipki)
-
-
Constructor Summary
Constructors Constructor Description XiHttpClient()XiHttpClient(SSLSocketFactory sslSocketFactory, HostnameVerifier hostnameVerifier)XiHttpClient(SslContextConf sslContextConf)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HttpRespContenthttpGet(String url)HttpRespContenthttpPost(String url, String requestContentType, byte[] request)HttpRespContenthttpPost(String url, String requestContentType, byte[] request, String expectedRespContentType)
-
-
-
Constructor Detail
-
XiHttpClient
public XiHttpClient()
-
XiHttpClient
public XiHttpClient(SslContextConf sslContextConf) throws ObjectCreationException
- Throws:
ObjectCreationException
-
XiHttpClient
public XiHttpClient(SSLSocketFactory sslSocketFactory, HostnameVerifier hostnameVerifier)
-
-
Method Detail
-
httpGet
public HttpRespContent httpGet(String url) throws IOException
- Throws:
IOException
-
httpPost
public HttpRespContent httpPost(String url, String requestContentType, byte[] request, String expectedRespContentType) throws IOException
- Throws:
IOException
-
httpPost
public HttpRespContent httpPost(String url, String requestContentType, byte[] request) throws IOException
- Throws:
IOException
-
-