public class HttpTransport
extends java.lang.Object
| Constructor and Description |
|---|
HttpTransport() |
| Modifier and Type | Method and Description |
|---|---|
HttpTransport |
addHeader(java.lang.String name,
java.lang.String value)
Adds a new parameter to this
HttpTransport instance. |
HttpTransport |
addParam(java.lang.String name,
java.lang.String value)
Adds a new parameter to this
HttpTransport instance. |
HttpTransport |
addParams(java.util.Map<java.lang.String,java.lang.String> newParams)
Adds a new parameter to this
HttpTransport instance. |
HttpResponse |
execute()
Executes the fetching logic.
|
java.lang.String |
getQueryString()
Gets query string of parameters.
|
HttpTransport |
setConnectTimeout(int theConnectTimeout)
Specifies connect timeout to this
HttpTransport instance. |
HttpTransport |
setHttpMethod(HttpMethod theHttpMethod)
Specifies request method to this
HttpTransport instance. |
HttpTransport |
setReadTimeout(int theReadTimeout)
Specifies read timeout to this
HttpTransport instance. |
HttpTransport |
setUrl(java.lang.String theUrl)
Specifies URL to this
HttpTransport instance. |
public final HttpTransport setUrl(java.lang.String theUrl)
HttpTransport instance.theUrl - The URL specified.HttpTransport instance.public final HttpTransport setReadTimeout(int theReadTimeout)
HttpTransport instance.theReadTimeout - The read timeout specified.HttpTransport instance.public final HttpTransport setConnectTimeout(int theConnectTimeout)
HttpTransport instance.theConnectTimeout - The connect timeout specified.HttpTransport instance.public final HttpTransport setHttpMethod(HttpMethod theHttpMethod)
HttpTransport instance.theHttpMethod - The request method specified.HttpTransport instance.public final HttpTransport addHeader(java.lang.String name, java.lang.String value)
HttpTransport instance.name - The parameter name specified.value - The parameter value specified.HttpTransport instance.public final HttpTransport addParam(java.lang.String name, java.lang.String value)
HttpTransport instance.name - The parameter name specified.value - The parameter value specified.HttpTransport instance.public final HttpTransport addParams(java.util.Map<java.lang.String,java.lang.String> newParams)
HttpTransport instance.newParams - The parameters specified.HttpTransport instance.public final HttpResponse execute() throws java.io.IOException
java.io.IOException - If IO errors occur.public final java.lang.String getQueryString()
throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingException - If encoding errors occur.