To perform a HTTP request, first create a request object with request(), then define its behaviour with req_ functions, then perform the request and fetch the response with req_perform().

request(base_url)

Arguments

base_url

Base URL for request.

Value

An HTTP response: an S3 list with class httr2_request.

Examples

request("http://r-project.org")
#> <httr2_request>
#> GET http://r-project.org
#> Body: empty