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 or httr 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 March 7, 2023, 5:25 p.m.