spring-guides / tut-rest

Building REST services with Spring :: Learn how to easily build RESTful services with Spring
https://spring.io/guides/tutorials/rest/
514 stars 412 forks source link

Mentioning correct curl commands for Windows #118

Open Vuizur opened 8 months ago

Vuizur commented 8 months ago

I think it would be nice to explicitly mention the correct CURL commands for Windows. The guide only mentions differences in the escaping rules, but this is hard to directly apply.

For example, on Powershell with Windows Terminal the following would work:

curl -X POST "localhost:8080/employees" -H "Content-type:application/json" -d "{\`"name\`": \`"Samwise Gamgee\`", \`"role\`": \`"gardener\`"}"
robertmcnees commented 1 month ago

Hi @Vuizur. Thanks for the issue. You are right that the curl commands specified are not user friendly for those working on a Windows machine.

I see 4 instances in the guide where this comes up. Is that how many you see as well?

If there are a limited number of instances, I think it would be OK to add Windows commands as well. I hesitate to add too much duplication of instructions only for a different local environment, but a limited number is probably fine.

Would you like to submit a PR? I will mark this issue as help wanted.