angularjs http post bad request 400 -


i sending post request $http:

$http({     method: 'post',     url: urlbuilt,             headers: {'content-type': 'application/json'},                                                              params: {"colcode":modcodecol,"whereclause":clause} }); 

when clause huge, getting bad request 400 error. when clause contains small string works. how can fix this.

try change params data in block of http this.

$http({     method: 'post',     url: urlbuilt,             headers: {'content-type': 'application/json'},                                                              data:{"colcode":modcodecol,"whereclause":clause} }); 

params if queryparams mean send on url. data appends request body.


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -