pluck_body: Extract the body from an HTTP request

View source: R/pluck_body.R

pluck_bodyR Documentation

Extract the body from an HTTP request

Description

Returns an appropriate representation of the data contained within a request body based on its encoding.

Usage

pluck_body(x)

Arguments

x

an unexecuted crul, httr or httr2 request object

Value

one of the following:

  • NULL if the request is not associated with a body

  • NULL if an upload is used not in a list

  • list containing the multipart-encoded body

  • character vector with the JSON- or raw-encoded body, or upload form file


webmockr documentation built on April 4, 2025, 12:08 a.m.