Skip to content
Advertisement

proper curl command for delete with > one word as the parameter

I have a rest request like the following:

JavaScript

the id is a String, and can have multiple words with spaces in between like

JavaScript

I would like to construct a curl command that supports String with spaces, but I don’t know how. Below does not pick up second word.

JavaScript

grateful for ideas. Thanks

Advertisement

Answer

The answer was provided by VGR. URLs cannot contain spaces, so I simply needed to URL encode the spaces in the parameter:

https://localhost:8080/v1/delete/DO%20RI

Advertisement