框架 - codeceptjs。 我想向我的aplication发送api请求: I.sendPostRequest I.sendGetRequest 等。
我安装了unirest库。我接下来要做什么?如何为这些函数编写帮助器?
答案 0 :(得分:1)
Install inirest with: npm install unirest -g
to delete:
await I.sendDeleteRequest(url)
to post:
await I.sendPostRequest(url, null, {
'Content-Type': 'application/json'
})