Skip to contents

Extract response body into list

Usage

resp_body_separate(resp, resp_body_fn = resp_body_auto)

Arguments

resp

(httr2_response) A single httr2::response() object (as returned by httr2::req_perform()).

resp_body_fn

A function to extract the body of the response. Default: resp_body_auto().

Value

The parsed response body wrapped in a list(). This is useful for things like raw vectors that you wish to parse with httr2::resps_data().