the data(specified with -d) to the URL when using a POST request ?
It puts it in the form but I want it in the url like it does when doing a GET request. The following command should have the args appended to the url instead of them being submitted as form:
Check the "url" field of the response
curl -sSq -X POST https://httpbin.sitischu.com/post -d 'test=test_value&test2=test_value2'
If you have jq installed:
curl -sSq -X POST https://httpbin.sitischu.com/post -d 'test=test_value&test2=test_value2' | jq ".url"
So instead of the URL being
http://httpbin.sitischu.com/post
I want it to be
http://httpbin.sitischu.com/post?test=test_value&test2=test_value2
I could just append them to the URL manually but having curl do it would be handier.
https://stackoverflow.com/questions/8498371/curl-get-and-x-get/8502004
Обсуждают сегодня