Flask RESTful POST JSON fails

后端 未结 3 1604
隐瞒了意图╮
隐瞒了意图╮ 2021-02-10 04:33

I have a problem posting JSON via curl from cmd (Windows7) to Flask RESTful. This is what I post:

curl.exe -i -H \"Content-Type: application/json\" \\
 -H \"Acce         


        
3条回答
  •  伪装坚强ぢ
    2021-02-10 05:02

    To add-on to the previous two answers, you do not need to escape the quotes across all OS's, following this syntax will work just fine on Mac/Linux:

    -d '{"Hello":"Karl"}'
    

提交回复
热议问题