我有一个邮递员项目,我需要将其转换为基于代码的API消耗。编写代码时遇到错误-'403-禁止访问。”请帮助我创建带有标头和身份验证数据的请求-我想我无法正确映射数据。请提供示例代码。 >
"request": {
"auth": {
"type": "basic","basic": [
{
"key": "password","value": "admin123","type": "string"
},{
"key": "username","value": "admin",{
"key": "saveHelperData","type": "any"
},{
"key": "showPassword","value": false,"type": "boolean"
}
]
},"method": "GET","header": [
{
"key": "accept","value": "application/json","type": "text"
},{
"key": "Content-Type","type": "text"
}
],"body": {
"mode": "raw","raw": ""
},"url": {
"raw": "https://test.com/query","protocol": "https","host": [
"homesite-qa","cloudinsurer","com"
],"path": [
"mic","api","hs","policy-search"
],"query": [
{
"key": "queryid","value": "00001"
},{
"key": "effectiveDateRange","value": "2020-01-01"
}
]
}
}