Description Usage Arguments See Also Examples
Query construction
1 2 3 |
.data |
Result of a call to |
... |
Comma separated list of unquoted variable names. These are combined into a list and passed to whatever http method is used downstream |
body_value |
one of the following:
|
.dots |
Used to work around non-standard evaluation |
Other dsl: api_config
,
api_error_handler
, api_query
,
api
, auth
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ## Not run:
## NSE
dd <- api("http://httpbin.org/post")
dd %>% api_body(body_value = NULL) %>% http("POST")
dd %>% api_body(body_value = "") %>% http("POST")
## other named parameters are passed as form values
dd %>% api_body(x = hello) %>% http("POST")
# upload a file
file <- "~/some_test.txt"
cat("hello, world", file = file)
dd %>% api_body(x = upload_file("~/some_test.txt")) %>% http("POST")
# A named list
dd %>% api_body(x = hello, y = stuff) %>% http("POST")
## SE
dd %>% api_body_(x = "hello", y = "stuff") %>% http("POST")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.