Learn R Programming

httr2 (version 1.0.5)

req_proxy: Use a proxy for a request

Description

Use a proxy for a request

Usage

req_proxy(
  req,
  url,
  port = NULL,
  username = NULL,
  password = NULL,
  auth = "basic"
)

Arguments

req

A httr2 request object.

url, port

Location of proxy.

username, password

Login details for proxy, if needed.

auth

Type of HTTP authentication to use. Should be one of the following: basic, digest, digest_ie, gssnegotiate, ntlm, any.

Examples

Run this code
# Proxy from https://www.proxynova.com/proxy-server-list/
if (FALSE) {
request("http://hadley.nz") |>
  req_proxy("20.116.130.70", 3128) |>
  req_perform()
}

Run the code above in your browser using DataLab