Add support for -G
Opened this issue · 2 comments
cohenaj194 commented
I am working with the PagerDuty REST API. Here is the command I am trying to convert:
curl -H "Content-type: application/json" -H "Authorization: Token token=$PAGERDUTY_ACCESS_KEY" -X GET -G --data-urlencode "since=2017-01-16" --data-urlencode "until=2017-01-17" "https://company.pagerduty.com/api/v1/schedules"
The two --data-urlencode
entries do not show up in the converted code. Am I correct in assuming there is no -G support?
ianrandmckenzie commented
Did you ever find a solution to this? @cohenaj194
rogerluan commented
I faced this problem too. Did some investigation and research, and this is the answer: https://stackoverflow.com/a/13660841/4075379
tl;dr:
--data-urlencode "since=2017-01-16" --data-urlencode "until=2017-01-17"
becomes
request.set_form_data({
since: "2017-01-16",
until: "2017-01-17",
})