![](/img/trans.png)
[英]DHTMLX dhtmlxForm.send() Throws HTTP Status 400 - “The request sent by the client was syntactically incorrect.”
[英]Status 400 The request sent by the client was syntactically incorrect. Angularjs http
我在服務器上有spring控制器:
@RequestMapping(value = "/lab/getAlgo", method = RequestMethod.POST)
public @ResponseBody Algo14web getPicksByLeague(@RequestBody AlgoRequest request) {
...
類AlgoRequest:
class AlgoRequest{
public int id;
public int limit; // I tried change to double and float too
}
和AngularJS:
$http.post(urlSer.url+"lab/getAlgo",{id:1,limit:2.5});
並且當客戶端向服務器發送請求時獲得Status 400 The request sent by the client was syntactically incorrect
客戶端發送的請求Status 400 The request sent by the client was syntactically incorrect
這是因為2.5
不是整數。
您的AlgoRequest
類要求limit
字段為整數,但是您嘗試傳遞2.5
in。在語法上是錯誤的,因為您沒有提供適合整數語法的值。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.