首先我搜索了论坛,但找不到相关的东西(希望我没有跳过任何东西,我真的是初学者)。
我要做的是验证POST请求(没有cookie,没有登录凭据,只有API访问密钥)
Postman中POST的示例网址:
https://devenv.myapp.mainhomepage.com/api/v4/gpp-category?access_key=xyzxyz000111222333444&filter[to]=app001&filter[from]=comp9&filter[service]=mobile
(我在URL中写了access_key,但是在Postman中,在URL和Headers中都可以作为键:Authorization,value:xyz01234 ..)
Postman中POST的示例BODY:
{
"data":{
"type":"gpp-category",
"attributes":{
"standard":{
"appid": "app001",
"name": "Java",
"developer": "Oracle",
"discontinued": false,
"scraper_1": "test-1"
},
"relationships":{
"to":{
"data":{ "type":"gpp-category", "id":"app001" }
},
"from":{
"data":{ "type":"gpp-category", "id":"comp9" }
}
}
}
}
}
现在,这就是我在JMeter中所做的事情:
1. Thread Group with HTTP Header Manager (Content-Type - application/json)
2. HTTP Request where:
Server Name: devenv.myapp.mainhomepage.com
Path: /api/v4/gpp-category?access_key=xyzxyz000111222333444&filter[to]=app001&filter[from]=comp9&filter[service]=mobile
Body Data: the above example of body.
查看结果树中的响应数据是:
{"data":[]}
问题:是否来自参数或我收到的响应未解码?帖子没有成功,我尝试了GET用于该ID,但无法找到。