# NOT RUN {
x <- HttpClient$new(url = "https://httpbin.org")
x$delete(path = 'delete')
## a list
(res1 <- x$delete('delete', body = list(hello = "world"), verbose = TRUE))
jsonlite::fromJSON(res1$parse("UTF-8"))
## a string
(res2 <- x$delete('delete', body = "hello world", verbose = TRUE))
jsonlite::fromJSON(res2$parse("UTF-8"))
## empty body request
x$delete('delete', verbose = TRUE)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab