public class HttpClient extends Object
Constructor and Description |
---|
HttpClient(String phost,
int pport,
String url,
Map headers,
String method,
String userName,
String password,
XmlHttpProxy.CookieCallback callback) |
HttpClient(String phost,
int pport,
String url,
Map headers,
String method,
XmlHttpProxy.CookieCallback callback) |
Modifier and Type | Method and Description |
---|---|
InputStream |
doPost(String postData,
String contentType)
posts data to the inputstream and returns the InputStream.
|
String |
getContentEncoding() |
int |
getContentLength() |
String |
getContentType() |
long |
getDate() |
String |
getHeader(String name) |
long |
getIfModifiedSince() |
InputStream |
getInputStream()
returns the inputstream from URLConnection
|
static Logger |
getLogger() |
OutputStream |
getOutputStream()
return the OutputStream from URLConnection
|
String |
getSetCookieHeader() |
public HttpClient(String phost, int pport, String url, Map headers, String method, XmlHttpProxy.CookieCallback callback) throws MalformedURLException
phost
- PROXY host namepport
- PROXY port stringurl
- URL stringheaders
- MapMalformedURLException
public HttpClient(String phost, int pport, String url, Map headers, String method, String userName, String password, XmlHttpProxy.CookieCallback callback) throws MalformedURLException
phost
- PROXY host namepport
- PROXY port stringurl
- URL stringheaders
- MapuserName
- stringpassword
- stringMalformedURLException
public String getSetCookieHeader()
public InputStream getInputStream()
public OutputStream getOutputStream()
public InputStream doPost(String postData, String contentType)
postData
- data to be posted. must be url-encoded already.contentType
- allows you to set the contentType of the request.public String getContentEncoding()
public int getContentLength()
public String getContentType()
public long getDate()
public long getIfModifiedSince()
public static Logger getLogger()
Copyright © 2013-2015 JBoss, a division of Red Hat. All Rights Reserved.