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

Can I use --data-urlencode ? #3

Closed
vikas027 opened this issue May 28, 2017 · 1 comment
Closed

Can I use --data-urlencode ? #3

vikas027 opened this issue May 28, 2017 · 1 comment

Comments

@vikas027
Copy link

As of now, I cannot convert --data-urlencode. Is this doable? If not, can you pls take it as a feature request? This is my curl command.

$ curl --user 'admin:password' -X POST "https://my-url" -d token=XXXX-XXX \
--data-urlencode json='{"parameter": [{"name":"ACCOUNT", "value":"111111"}]}'

Thanks.

@vikas027
Copy link
Author

Never mind, -d works for --data-urlencode as well. I found it a little misleading as man curl has listed these two options separately.

       --data-raw <data>
              (HTTP) This posts data similarly to --data but without the special interpretation of the @ character. See -d, --data.  (Added in 7.43.0)

       --data-urlencode <data>
              (HTTP) This posts data, similar to the other --data options with the exception that this performs URL-encoding. (Added in 7.18.0)

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