1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
# can control space handling
Code
req_url_query(req, a = " ", .space = "bar")
Condition
Error in `multi_dots()`:
! `.space` must be one of "percent" or "form", not "bar".
# can handle multi query params
Code
req_url_query_multi("error")
Condition
Error in `url_modify_query()`:
! All vector elements of `...` must be length 1.
i Use `.multi` to choose a strategy for handling vectors.
# errors are forwarded correctly
Code
req %>% req_url_query(1)
Condition
Error in `url_modify_query()`:
! All components of `...` must be named.
Code
req %>% req_url_query(a = I(1))
Condition
Error in `url_modify_query()`:
! Escaped query value `a` must be a single string, not the number 1.
Code
req %>% req_url_query(a = 1:2)
Condition
Error in `url_modify_query()`:
! All vector elements of `...` must be length 1.
i Use `.multi` to choose a strategy for handling vectors.
Code
req %>% req_url_query(a = mean)
Condition
Error in `url_modify_query()`:
! All elements of `...` must be either an atomic vector or NULL.
|