API responses generally follow a structured format. Use this function to
extract the relevant portion of a response, and wrangle it into a desired
format. This function is most useful when the response was fetched with a
request that includes a tidying policy defined via req_tidy_policy().
Arguments
- resps
(
httr2_response,nectar_responses, orlist) A singlehttr2::response()object (as returned byhttr2::req_perform()) or a list of such objects (as returned byreq_perform_opinionated()orhttr2::req_perform_iterative()).
Value
The extracted and cleaned response, or, for a list of responses,
those responses cleaned then concatenated via httr2::resps_data(). By
default, the response is processed with resp_body_auto().
See also
resp_tidy_json() for an opinionated response parser for JSON
responses, resp_body_auto() (etc) for a family of response parsers that
attempts to automatically select the appropriate parser based on the
response content type, httr2::resp_body_raw() (etc) for the underlying
httr2 response parsers, and resp_parse() for an alternative approach to
dealing with responses (particularly useful if the request does not include
a resp_tidy policy).