缺字段时服务器说了什么
提交一个空对象去新建任务:
响应里 ok 这个字段的值是什么?
$ curl -s -X POST http://127.0.0.1:8000/tasks -H 'Content-Type: application/json' -d '{}'
{"ok": false, "error": "title is required"}
提交一个空对象去新建任务:
响应里 ok 这个字段的值是什么?
$ curl -s -X POST http://127.0.0.1:8000/tasks -H 'Content-Type: application/json' -d '{}'
{"ok": false, "error": "title is required"}
全部评论