get_url_request_result {sched}R Documentation

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
)

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.

Value

The request result, as a character value.

Examples

# 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))


[Package sched version 1.0.1 Index]