Skip to content

Unexpected conversion using -d #11

@johndharrison

Description

@johndharrison

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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions