org.jsoup.helper
Class HttpConnection.Request

java.lang.Object
  extended by org.jsoup.helper.HttpConnection.Request
All Implemented Interfaces:
Connection.Base<Connection.Request>, Connection.Request
Enclosing class:
HttpConnection

public static class HttpConnection.Request
extends Object
implements Connection.Request


Method Summary
 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.
 Connection.Request ignoreContentType(boolean ignoreContentType)
          Configures the request to ignore the Content-Type of the response.
 boolean ignoreHttpErrors()
          Get the current ignoreHttpErrors configuration.
 Connection.Request ignoreHttpErrors(boolean ignoreHttpErrors)
          Configures the request to ignore HTTP errors in the response.
 Parser parser()
          Get the current parser to use when parsing the document.
 HttpConnection.Request parser(Parser parser)
          Specify the parser to use when parsing the document.
 int timeout()
          Get the request timeout, in milliseconds.
 HttpConnection.Request timeout(int millis)
          Update the request timeout.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jsoup.Connection.Base
cookie, cookie, cookies, hasCookie, hasHeader, header, header, headers, method, method, removeCookie, removeHeader, url, url
 

Method Detail

timeout

public int timeout()
Description copied from interface: Connection.Request
Get the request timeout, in milliseconds.

Specified by:
timeout in interface Connection.Request
Returns:
the timeout in milliseconds.

timeout

public HttpConnection.Request timeout(int millis)
Description copied from interface: Connection.Request
Update the request timeout.

Specified by:
timeout in interface Connection.Request
Parameters:
millis - timeout, in milliseconds
Returns:
this Request, for chaining

followRedirects

public boolean followRedirects()
Description copied from interface: Connection.Request
Get the current followRedirects configuration.

Specified by:
followRedirects in interface Connection.Request
Returns:
true if followRedirects is enabled.

followRedirects

public Connection.Request followRedirects(boolean followRedirects)
Description copied from interface: Connection.Request
Configures the request to (not) follow server redirects. By default this is true.

Specified by:
followRedirects in interface Connection.Request
Parameters:
followRedirects - true if server redirects should be followed.
Returns:
this Request, for chaining

ignoreHttpErrors

public boolean ignoreHttpErrors()
Description copied from interface: Connection.Request
Get the current ignoreHttpErrors configuration.

Specified by:
ignoreHttpErrors in interface Connection.Request
Returns:
true if errors will be ignored; false (default) if HTTP errors will cause an IOException to be thrown.

ignoreHttpErrors

public Connection.Request ignoreHttpErrors(boolean ignoreHttpErrors)
Description copied from interface: Connection.Request
Configures the request to ignore HTTP errors in the response.

Specified by:
ignoreHttpErrors in interface Connection.Request
Parameters:
ignoreHttpErrors - set to true to ignore HTTP errors.
Returns:
this Request, for chaining

ignoreContentType

public boolean ignoreContentType()
Description copied from interface: Connection.Request
Get the current ignoreContentType configuration.

Specified by:
ignoreContentType in interface Connection.Request
Returns:
true if invalid content-types will be ignored; false (default) if they will cause an IOException to be thrown.

ignoreContentType

public Connection.Request ignoreContentType(boolean ignoreContentType)
Description copied from interface: Connection.Request
Configures the request to ignore the Content-Type of the response.

Specified by:
ignoreContentType in interface Connection.Request
Parameters:
ignoreContentType - set to true to ignore the content type.
Returns:
this Request, for chaining

data

public HttpConnection.Request data(Connection.KeyVal keyval)
Description copied from interface: Connection.Request
Add a data parameter to the request

Specified by:
data in interface Connection.Request
Parameters:
keyval - data to add.
Returns:
this Request, for chaining

data

public Collection<Connection.KeyVal> data()
Description copied from interface: Connection.Request
Get all of the request's data parameters

Specified by:
data in interface Connection.Request
Returns:
collection of keyvals

parser

public HttpConnection.Request parser(Parser parser)
Description copied from interface: Connection.Request
Specify the parser to use when parsing the document.

Specified by:
parser in interface Connection.Request
Parameters:
parser - parser to use.
Returns:
this Request, for chaining

parser

public Parser parser()
Description copied from interface: Connection.Request
Get the current parser to use when parsing the document.

Specified by:
parser in interface Connection.Request
Returns:
current Parser


Copyright © 2009-2012 Jonathan Hedley. All Rights Reserved.