public static class HttpConnection.Request extends Object implements Connection.Request
Modifier and Type | Method and Description |
---|---|
Collection<Connection.KeyVal> |
data()
Get all of the request's data parameters
|
HttpConnection.Request |
data(Connection.KeyVal keyval)
Add a data parameter to the request
|
boolean |
followRedirects()
Get the current followRedirects configuration.
|
Connection.Request |
followRedirects(boolean followRedirects)
Configures the request to (not) follow server redirects.
|
boolean |
ignoreContentType()
Get the current ignoreContentType configuration.
|
void |
ignoreContentType(boolean ignoreContentType)
Configures the request to ignore the Content-Type of the response.
|
boolean |
ignoreHttpErrors()
Get the current ignoreHttpErrors configuration.
|
void |
ignoreHttpErrors(boolean ignoreHttpErrors)
Configures the request to ignore HTTP errors in the response.
|
int |
timeout()
Get the request timeout, in milliseconds.
|
HttpConnection.Request |
timeout(int millis)
Update the request timeout.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
cookie, cookie, cookies, hasCookie, hasHeader, header, header, headers, method, method, removeCookie, removeHeader, url, url
public int timeout()
Connection.Request
timeout
in interface Connection.Request
public HttpConnection.Request timeout(int millis)
Connection.Request
timeout
in interface Connection.Request
millis
- timeout, in millisecondspublic boolean followRedirects()
Connection.Request
followRedirects
in interface Connection.Request
public Connection.Request followRedirects(boolean followRedirects)
Connection.Request
followRedirects
in interface Connection.Request
followRedirects
- true if server redirects should be followed.public boolean ignoreHttpErrors()
Connection.Request
ignoreHttpErrors
in interface Connection.Request
public void ignoreHttpErrors(boolean ignoreHttpErrors)
Connection.Request
ignoreHttpErrors
in interface Connection.Request
ignoreHttpErrors
- set to true to ignore HTTP errors.public boolean ignoreContentType()
Connection.Request
ignoreContentType
in interface Connection.Request
public void ignoreContentType(boolean ignoreContentType)
Connection.Request
ignoreContentType
in interface Connection.Request
ignoreContentType
- set to true to ignore the contenet type.public HttpConnection.Request data(Connection.KeyVal keyval)
Connection.Request
data
in interface Connection.Request
keyval
- data to add.public Collection<Connection.KeyVal> data()
Connection.Request
data
in interface Connection.Request
Copyright © 2009-2015 Jonathan Hedley. All Rights Reserved.