hub一直报需要设置header为application/json. postmax也提交也报错
Created by: Simba9980
启动后首先尝试使用java访问API
HttpRequest httpRequest = HttpRequest.post(url).form(prams).contentType("application/json"); HttpResponse httpResponse = httpRequest.execute();
提示 :{"msg":"This usage is out of date, please use 'application/json' as content-type to post to /predict/senta_lstm. See 'https://github.com/PaddlePaddle/PaddleHub/blob/release/v1.6/docs/tutorial/serving.md' for more details.","results":"","status":"-1"}
已经确认把content-type设置成application/json,参数from表单提交跟body体提交都已经尝试,还是不行。
然后使用postman进行提交,还是同样的提示错误