Connection-class: CLASS Connection

Description Details Fields Methods

Description

A Connection provides a convenient interface to fetch content from the web, and parse them into Documents.

Details

To get a new Connection, use Jsoup$connect(String). Connections contain Connection.Request and Connection.Response objects. The request objects are reusable as prototype requests. Request configuration can be made using either the shortcut methods in Connection (e.g. userAgent(String)), or by methods in the Connection.Request object directly. All request configuration must be made before the request is executed.

Fields

connection:

Object of class "jobjRef"

Methods

new(...):

Create a new Connection object. ... is used to define the appropriate slots.

cookie(name, value):

Set a cookie to be sent in the request.

name:

Character: name of cookie

value:

Character: value of cookie

cookies(cookies):

Adds each of the supplied cookies to the request.

cookies:

list: A list of cookie names and value pairs. The list values should be of type character.

get():

Execute the request as a GET, and parse the result. Returns a Document

post():

Execute the request as a POST, and parse the result. Returns a Document

getUrl():

Get the URL

setUrl():

Set the URL


johndharrison/Rsoup documentation built on May 19, 2019, 4:22 p.m.