下面是我的代码:
axios({
method: "GET",
url: "http://112.196.108.244:9002/api/survey/question/get-question/not-answered/?surveyId=",
headers: {
"content-type": "application/json",
Authorization: `Bearer token-key`,
},
body: {
id: "68367859",
isMandatory: "false",
paginationFilter: { limit: 10, offset: 0, order: "DESC" },
filterInput: {
locationIds: ["1", "4011403", "4012144"],
categoryIds: [
"twoSubCategories/7898496",
"domains/7895290",
"subCategories/7896491",
],
},
},
})
.then((response) => {
console.log("response", response);
})
.catch((error) => {
console.log("error", error.response.data);
});
这个代码给我错误:控制台中的错误是-
details: "uri=/api/survey/question/get-question/not-answered/"
message: "document key is not valid."
status: 400
1条答案
按热度按时间5lhxktic1#
你要在body中传递id,这里有两个问题:
1.您需要做的是将id(我假设是调查id)作为query parameter传递。
根据需要添加其他参数。