使用API请求UNIT时出现Bad Request错误,需要如何处理?
潮凯 发布于2017-07 浏览:5109 回复:4
0
收藏

我使用Postman进行API接口测试的时候,返回了如下的错误信息,请问如何解决?是哪里的问题?

{

    "timestamp": 1500368718739,

    "status": 400,

    "error": "Bad Request",

    "exception": "org.springframework.http.converter.HttpMessageNotReadableException",

    "message": "Could not read document: Unexpected character ('-' (code 45)) in numeric value: expected digit (0-9) to follow minus sign, for valid numeric value\n at [Source: java.io.PushbackInputStream@5f175828; line: 1, column: 3]; nested exception is com.fasterxml.jackson.core.JsonParseException: Unexpected character ('-' (code 45)) in numeric value: expected digit (0-9) to follow minus sign, for valid numeric value\n at [Source: java.io.PushbackInputStream@5f175828; line: 1, column: 3]",

    "path": "/rpc/v1/solution/unit_utterance"

}

收藏
点赞
0
个赞
共4条回复 最后由jingqizu回复于2017-09
#5jingqizu回复于2017-09

请问secene_id和session_id怎么设置的呢?

0
#4zziafyc回复于2017-07
#3 潮凯回复
明白了,谢谢。

你是怎么解决的,我也遇到了这个错误

0
#3潮凯回复于2017-07
#2 伊茨米可回复
您的请求有问题,请参考 curl -XPOST 'https://aip.baidubce.com/rpc/2.0/solution/v1/unit_utterance?access_token=usertoken'-H "Content-Type: application/json" -d '{"scene_id":123,"query":"test","session_id":""}' 示例代码即将上线,敬请期待
展开

明白了,谢谢。

0
#2伊茨米可回复于2017-07

您的请求有问题,请参考

curl -XPOST 'https://aip.baidubce.com/rpc/2.0/solution/v1/unit_utterance?access_token=usertoken'-H "Content-Type: application/json" -d '{"scene_id":123,"query":"test","session_id":""}'


示例代码即将上线,敬请期待

0
TOP
切换版块