|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectr01f.httpclient.HttpConnectionStatement
public class HttpConnectionStatement
| Field Summary | |
|---|---|
private java.util.List<HttpRequestParameter> |
parameters
|
private java.lang.String |
proxyHost
|
private java.lang.String |
proxyPassword
|
private java.lang.String |
proxyPort
|
private java.lang.String |
proxyUser
|
private java.util.Map<java.lang.String,java.lang.String> |
requestHeaders
|
private HttpMethodStatement.RequestMethod |
requestMethod
|
private java.nio.charset.Charset |
targetServerCharset
|
private java.lang.String |
targetUrlStr
|
private long |
timeout
|
| Constructor Summary | |
|---|---|
HttpConnectionStatement(java.lang.String newTargetUrlStr,
java.nio.charset.Charset newTargetServerCharset,
java.util.List<HttpRequestParameter> newParams,
HttpMethodStatement.RequestMethod newMethod)
|
|
| Method Summary | |
|---|---|
private void |
_setHeader(java.lang.String name,
java.lang.String value)
Establece una cabecera de la request |
java.net.HttpURLConnection |
getConnection()
Obtiene la respuesta del servidor |
java.io.InputStream |
loadAsStream()
Obtiene un stream a la respuesta del servidor |
java.lang.String |
loadAsString()
Carga los datos en un String |
HttpConnectionStatement |
notUsingProxy()
|
HttpConnectionStatement |
settingCookies(java.util.Map<java.lang.String,java.lang.String> cookies)
Establece las cookies que hay que enviar al servidor al hacer la petición HTTP |
HttpConnectionStatement |
usingProxy(java.lang.String theProxyHost,
java.lang.String theProxyPort,
java.lang.String theUser,
java.lang.String thePassword)
Establece los datos para establecer la conexión a través del proxy |
HttpConnectionStatement |
withConnectionTimeOut(long timeOutMillis)
Establece el timeout para obtener una conexión |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private java.lang.String targetUrlStr
private java.nio.charset.Charset targetServerCharset
private java.util.List<HttpRequestParameter> parameters
private HttpMethodStatement.RequestMethod requestMethod
private java.util.Map<java.lang.String,java.lang.String> requestHeaders
private long timeout
private java.lang.String proxyHost
private java.lang.String proxyPort
private java.lang.String proxyUser
private java.lang.String proxyPassword
| Constructor Detail |
|---|
HttpConnectionStatement(java.lang.String newTargetUrlStr,
java.nio.charset.Charset newTargetServerCharset,
java.util.List<HttpRequestParameter> newParams,
HttpMethodStatement.RequestMethod newMethod)
| Method Detail |
|---|
public HttpConnectionStatement withConnectionTimeOut(long timeOutMillis)
timeOutMillis - tiempo máximo (en millis) para obtener una conexión
public HttpConnectionStatement usingProxy(java.lang.String theProxyHost,
java.lang.String theProxyPort,
java.lang.String theUser,
java.lang.String thePassword)
theProxyHost - host donde se encuentra el proyxtheProxyPort - puerto donde atiende el proxy a las peticiones http/httpstheUser - usuariothePassword - passwordpublic HttpConnectionStatement notUsingProxy()
public HttpConnectionStatement settingCookies(java.util.Map<java.lang.String,java.lang.String> cookies)
cookies - las cookies
public java.net.HttpURLConnection getConnection()
throws java.io.IOException
java.io.IOException
public java.lang.String loadAsString()
throws java.io.IOException
java.io.IOException - si no se puede conectar
public java.io.InputStream loadAsStream()
throws java.io.IOException
java.io.IOException - si no se puede conectar
private void _setHeader(java.lang.String name,
java.lang.String value)
name - nombre de la cabeceravalue - valor de la cabecera
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||