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,
String authHeader) |
| Modifier and Type | Method and Description |
|---|---|
InputStream |
doPost(byte[] 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
|
int |
getResponseCode() |
String |
getResponseMessage() |
String |
getSetCookieHeader() |
public HttpClient(String phost, int pport, String url, Map headers, String method, XmlHttpProxy.CookieCallback callback, String authHeader) throws MalformedURLException
phost - PROXY host namepport - PROXY port stringurl - URL stringheaders - MapMalformedURLExceptionpublic 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 - stringMalformedURLExceptionpublic String getSetCookieHeader()
public String getResponseMessage()
public int getResponseCode()
public InputStream getInputStream()
public OutputStream getOutputStream()
public InputStream doPost(byte[] 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 © 2014 JBoss, a division of Red Hat. All rights reserved.