Learn R Programming

sched (version 1.0.3)

get_url_request_result: Send a request and get results.

Description

Send the request described by a Request instance, using the provided user agent, and return the results.

Usage

get_url_request_result(
  request,
  useragent = NULL,
  ssl_verifypeer = TRUE,
  binary = FALSE
)

Value

The request result, as a character value.

Arguments

request

A sched:Request object.

useragent

The user agent, as a character value. Example: "myapp ; my.name@my.addr"

ssl_verifypeer

Set to FALSE if you want to disable SSL verification for https sites. TRUE by default.

binary

Set to TRUE if the content to be retrieved is binary.

Examples

Run this code
# Retrieve the content of a web page
u <- sched::URL$new('https://httpbin.org/get')
content <- sched::get_url_request_result(sched::Request$new(u))

Run the code above in your browser using DataLab