Skip to content
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

Unexpected conversion using -d #11

Open
johndharrison opened this issue Oct 20, 2016 · 0 comments
Open

Unexpected conversion using -d #11

johndharrison opened this issue Oct 20, 2016 · 0 comments

Comments

@johndharrison
Copy link
Contributor

johndharrison commented Oct 20, 2016

Using -d we expect to see a body argument in the VERB:

> "curl -X POST -d 'a=8089' http://abcdef.org"  %>% straighten  %>% make_req -> uu
curl -X POST -d 'a=8089' http://abcdef.org
> uu
[[1]]
function () 
httr::VERB(verb = "POST", url = "http://abcdef.org")
<environment: 0x5742460>

--data correctly adds the body argument:

> "curl -X POST --data 'a=8089' http://abcdef.org"  %>% straighten  %>% make_req -> uu
curl -X POST --data 'a=8089' http://abcdef.org
> uu
[[1]]
function () 
httr::VERB(verb = "POST", url = "http://abcdef.org", body = list(a = "8089"))
<environment: 0x550e248>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant