我可以和弗里斯比很好地相处,但我似乎无法用它来发布。我使用Postman确保POST有效,但它总是返回Frisby的错误。 (错误没有帮助...... api只发送404错误。)这是我正在使用的代码:
.frisby.create('test post')
.post('http://localhost/api', {
"data": {
"name": "Jackie L Smith",
"birthdate": "2007-08-14",
"relationship": "child",
"boolVar": false
}
}, {json: true}, {headers: { 'Content-Type': 'application/json' }})
.expectStatus(204)
.toss();
为了记录,api的成功代码由于某种原因是204。有人可以告诉我为什么它不是POST?