resp_raw: Show the raw response

View source: R/resp.R

resp_rawR Documentation

Show the raw response

Description

This function reconstructs the HTTP message that httr2 received from the server. It's unlikely to be exactly byte-for-byte identical (because most servers compress at least the body, and HTTP/2 can also compress the headers), but it conveys the same information.

Usage

resp_raw(resp)

Arguments

resp

A httr2 response object, created by req_perform().

Value

resp (invisibly).

Examples

resp <- request(example_url()) |>
  req_url_path("/json") |>
  req_perform()
resp |> resp_raw()

r-lib/httr2 documentation built on Nov. 4, 2024, 11:32 p.m.