Skip to content

DELETE ignores body parameter #326

Closed
@sckott

Description

@sckott

Sorry if I missed something/did something wrong, but it seems that body isn't allowed in httr::DELETE() - e.g.,

DELETE("https://httpbin.org/delete", body=list(a=5), verbose())
#> -> DELETE /delete HTTP/1.1
#> -> Host: httpbin.org
#> -> User-Agent: libcurl/7.43.0 r-curl/0.9.5 httr/1.1.0
#> -> Accept-Encoding: gzip, deflate
#> -> Accept: application/json, text/xml, application/xml, */*
#> -> 
#> <- HTTP/1.1 200 OK
#> <- Server: nginx
#> <- Date: Thu, 28 Jan 2016 22:18:50 GMT
#> <- Content-Type: application/json
#> <- Content-Length: 367
#> <- Connection: keep-alive
#> <- Access-Control-Allow-Origin: *
#> <- Access-Control-Allow-Credentials: true
#> <- 

The spec https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html doesn't explicitly forbid or discourage its use in DELETE.

Would you be up for allowing body in delete?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions