org.jsoup
Interface Connection.Request

All Superinterfaces:
Connection.Base<Connection.Request>
All Known Implementing Classes:
HttpConnection.Request
Enclosing interface:
Connection

public static interface Connection.Request
extends Connection.Base<Connection.Request>

Represents a HTTP request.


Method Summary
 Collection<Connection.KeyVal> data()
          Get all of the request's data parameters
 Connection.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.
 Connection.Request parser(Parser parser)
          Specify the parser to use when parsing the document.
 int timeout()
          Get the request timeout, in milliseconds.
 Connection.Request timeout(int millis)
          Update the request timeout.
 
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

int timeout()
Get the request timeout, in milliseconds.

Returns:
the timeout in milliseconds.

timeout

Connection.Request timeout(int millis)
Update the request timeout.

Parameters:
millis - timeout, in milliseconds
Returns:
this Request, for chaining

followRedirects

boolean followRedirects()
Get the current followRedirects configuration.

Returns:
true if followRedirects is enabled.

followRedirects

Connection.Request followRedirects(boolean followRedirects)
Configures the request to (not) follow server redirects. By default this is true.

Parameters:
followRedirects - true if server redirects should be followed.
Returns:
this Request, for chaining

ignoreHttpErrors

boolean ignoreHttpErrors()
Get the current ignoreHttpErrors configuration.

Returns:
true if errors will be ignored; false (default) if HTTP errors will cause an IOException to be thrown.

ignoreHttpErrors

Connection.Request ignoreHttpErrors(boolean ignoreHttpErrors)
Configures the request to ignore HTTP errors in the response.

Parameters:
ignoreHttpErrors - set to true to ignore HTTP errors.
Returns:
this Request, for chaining

ignoreContentType

boolean ignoreContentType()
Get the current ignoreContentType configuration.

Returns:
true if invalid content-types will be ignored; false (default) if they will cause an IOException to be thrown.

ignoreContentType

Connection.Request ignoreContentType(boolean ignoreContentType)
Configures the request to ignore the Content-Type of the response.

Parameters:
ignoreContentType - set to true to ignore the content type.
Returns:
this Request, for chaining

data

Connection.Request data(Connection.KeyVal keyval)
Add a data parameter to the request

Parameters:
keyval - data to add.
Returns:
this Request, for chaining

data

Collection<Connection.KeyVal> data()
Get all of the request's data parameters

Returns:
collection of keyvals

parser

Connection.Request parser(Parser parser)
Specify the parser to use when parsing the document.

Parameters:
parser - parser to use.
Returns:
this Request, for chaining

parser

Parser parser()
Get the current parser to use when parsing the document.

Returns:
current Parser


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