How do I POST JSON data with cURL?

后端 未结 24 2848
刺人心
刺人心 2020-11-21 23:56

I use Ubuntu and installed cURL on it. I want to test my Spring REST application with cURL. I wrote my POST code at the Java side. However, I want to test it with cURL. I am

24条回答
  •  日久生厌
    2020-11-22 00:43

    You can use Postman with its intuitive GUI to assemble your cURL command.

    1. Install and Start Postman
    2. Type in your URL, Post Body, Request Headers etc. pp.
    3. Click on Code
    4. Select cURL from the drop-down list
    5. copy & paste your cURL command

    Note: There are several options for automated request generation in the drop-down list, which is why I thought my post was neccessary in the first place.

提交回复
热议问题