New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DELETE ignores body parameter #326

Closed
sckott opened this Issue Jan 28, 2016 · 0 comments

Comments

Projects
None yet
1 participant
@sckott

sckott commented Jan 28, 2016

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?

@hadley hadley closed this in 0fa3efc May 20, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment