Reputation: 41
I am trying to delete components from nexus repository created component for delete by generating REST API
curl -X DELETE --header 'Accept: application/json' 'http://localhost:8081/service/siesta/rest/beta/components/sam'
I get these errors:
curl: (6) Could not resolve host: application
curl: (1) Protocol "'http" not supported or disabled in libcurl
Upvotes: 1
Views: 1664
Reputation: 58014
Single quotes (') are not supported by the Windows cmd command prompt. You must use double quotes (") instead with that shell.
The single quotes you use will not be stripped off by the shell and are instead passed on to curl that reads them as part of the arguments and that is certainly not what you want.
Your command line should therefore rather be written like this:
curl -X DELETE --header "Accept: application/json" "http://localhost:8081/service/siesta/rest/beta/components/sam"
Alternatively, use a shell/system that supports single quotes.
Upvotes: 2