RapiDoc icon indicating copy to clipboard operation
RapiDoc copied to clipboard

Windows shell quoting, curl -d example

Open gitgrub opened this issue 2 years ago • 0 comments

Hello,

there is a problem with quoting in the windows shell. Here is an example with the curl delete method, using -d for data. The api doc page says:

curl -X DELETE "http://127.0.0.1:8025/api/v1/messages" \
 -H "content-type: application/json" \
 -d '{"ids":["string"]}' 

This works fine on linux, but in the win shell data will be empty, therefore we need:

curl -X DELETE "http://127.0.0.1:8025/api/v1/messages" -H "content-type: application/json" -d "{\"ids\":[\"string\"]}"

If you think that is not beautiful: you are right. I do not know how to implement that into RapiDoc in a nice way, just stumbled over it right now.

gitgrub avatar Apr 12 '23 05:04 gitgrub