Code
req_body_file(request_test(), "doesntexist", type = "text/plain")
Condition
Error in `req_body_file()`:
! `path` ('doesntexist') does not exist.
Code
req_body_json(request_test(), mtcars, type = "application/xml")
Condition
Error in `req_body_json()`:
! Unexpected content type "application/xml".
* Expecting type "application/json" or suffix "json".
Code
req %>% req_body_json(list(x = 1))
Condition
Error in `req_body_json()`:
! Can't change body type from raw to json.
i You must use only one type of `req_body_*()` per request.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.