i have a test server running on port 3062, i want to send it HTTP POST data using curl
when i run the following command :
curl -d '{"k1":"v1","k2","v2"}' -X POST http://localhost:3062
it works fine i get the response
but when i run the following:
sudo curl -d '{"k1":"v1","k2","v2"}' -X POST http://localhost:3062
i get: 301 and a redirect page
I cannot remove the sudo as the curl command is part of a much larger script that requires it.
sudo
could be dropping the variable. – Jeff Schaller Mar 07 '19 at 15:06curl
call to explicitly use a proxy with the--proxy
command-line option. – Jeff Schaller Mar 07 '19 at 15:18