curlconverter
curlconverter copied to clipboard
Unexpected conversion using -d
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>