Flask RESTful POST JSON fails

后端 未结 3 1605
隐瞒了意图╮
隐瞒了意图╮ 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 04:49

    -d '{"Hello":"Karl"}' doesn't work from windows as its surrounded by single quotes. Use double quotes around and it will work for you.

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

提交回复
热议问题