Page 1 of 1

Request Service not working

Posted: Thu Jun 15, 2017 11:07 am
by Deon

Hi

I am running a service. Weinre says that there is a problem with my field that it is not an Integer. it is an integer.

Applying the Test from service works. The parameter is pulled from a local storage which is a number.

Here is the Weinre complaint

Request URL:http://xxx.xxx.xxx.xxx:81/api/v2/zoot...
Request Method:GET
Status Code:400 Bad Request400 Bad Request
Query String Parameters
filter:fromID=27 AND rideID=4
Request Payload
filter=fromID%3D27+AND+rideID%3D4
Response Headers
Cache-Control:no-cache
Connection:close
Content-Length:89
Content-Type:application/json
Date:Thu, 15 Jun 2017 10
Server:Apache
Vary:Cookie
X-Frame-Options:SAMEORIGIN
X-Powered-By:PHP/7.0.11

and the error

{"error":{"context":null,"message":"Field 'fromID' must be a valid integer.","code":400}}

As I said fromID is a local storage variable defined as a number field.
What more does it want?? Oh and the database fromID field is also an integer

Thank you


Request Service not working

Posted: Thu Jun 15, 2017 5:03 pm
by Serhii Kulibaba

Hello Deon,

You don't send the fromID as a request parameter at all, you send it as a part of the filter parameter. It might be an issue


Request Service not working

Posted: Fri Jun 16, 2017 4:33 am
by Deon

Hi Serhii

Thank you for the reply. It was sent as part of the filter parameter.

Found the issue. My filter condition syntax was correct as per above for MSSQL type DB access but for mySQL access it should be.

(fromID=27) AND (rideID=5)

It needed some brackets.

Thank you.