I am using hadoop apache 2.7.1 on centos 7 and I want to delete a file(file1) by using webhdfs commands.
curl -i -x DELETE "http://192.168.25.21:50070/webhdfs/v1/hadoophome/file1/?user.name=root&op=DELETE&recursive=true"
But I am getting this error:
curl: (5) Could not resolve proxy: DELETE; Unknown error
I edited bashrc file as following :
export http_proxy=""
export https_proxy=""
export ftp_proxy=""
And source the file to save changes
source ~/.bashrc
But with the same error.
So I tried to set no proxy in the culr command as
curl -i -x --noproxy localhost DELETE "http://192.168.25.21:50070/webhdfs/v1/hadoophome/file1/?user.name=root&op=DELETE&recursive=true"
With this error:
curl: (5) Could not resolve proxy: --noproxy; Unknown error
What should I edit to exclude this proxy?
Thanks.
-x
stands for proxy. You should be using -X
to specify the request method.
So the command would be,
curl -i -X DELETE "http://192.168.25.21:50070/webhdfs/v1/hadoophome/file1/?user.name=root&op=DELETE&recursive=true"
Refer curl(1) for options.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With