Skip to content

Commit 962d50a

Browse files
committed
Clarify .multi option
#593
1 parent fdacb85 commit 962d50a

File tree

4 files changed

+16
-11
lines changed

4 files changed

+16
-11
lines changed

R/req-body.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@ req_body_json_modify <- function(req, ...) {
137137
#' data in the body.
138138
#'
139139
#' * For `req_body_form()`, the values must be strings (or things easily
140-
#' coerced to strings);
140+
#' coerced to strings). Vectors are convertd to strings using the
141+
#' value of `.multi`.
141142
#' * For `req_body_multipart()` the values must be strings or objects
142143
#' produced by [curl::form_file()]/[curl::form_data()].
143144
#' * For `req_body_json_modify()`, any simple data made from atomic vectors

R/req-url.R

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,11 @@ req_url <- function(req, url) {
5555
#' * `"error"`, the default, throws an error.
5656
#' * `"comma"`, separates values with a `,`, e.g. `?x=1,2`.
5757
#' * `"pipe"`, separates values with a `|`, e.g. `?x=1|2`.
58-
#' * `"explode"`, turns each element into its own parameter, e.g. `?x=1&x=2`.
58+
#' * `"explode"`, turns each element into its own parameter, e.g. `?x=1&x=2`
5959
#'
60-
#' If none of these functions work, you can alternatively supply a function
61-
#' that takes a character vector and returns a string.
60+
#' If none of these options work for your needs, you can instead supply a
61+
#' function that takes a character vector of argument values and returns a
62+
#' a single string.
6263
req_url_query <- function(.req,
6364
...,
6465
.multi = c("error", "comma", "pipe", "explode")) {

man/req_body.Rd

Lines changed: 6 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/req_url.Rd

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)