resp <- request("https://httr2.r-lib.org") |> req_perform()
resp
resp |> resp_has_body()
resp |> resp_body_raw()
resp |> resp_body_string()
if (requireNamespace("xml2", quietly = TRUE)) {
resp |> resp_body_html()
}
Run the code above in your browser using DataLab