Learn R Programming

crul (version 0.4.0)

delete-requests: HTTP DELETE requests

Description

HTTP DELETE requests

Arguments

Examples

Run this code
# NOT RUN {
(x <- HttpClient$new(url = "https://httpbin.org"))

## 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)

# }

Run the code above in your browser using DataLab