I am wondering if Restler handle validation on JSON request format?
In example, I have this JSON request:
{ "id" : 1, "party_id" : , "description" : "say it here" }
The value for party_id should invalid. Any insights? Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
JSON Validation in Restler 2.0.5
Starting from Restler version 2.0.5, restler automatically throws HTTP 400 status with a meaningful error message when the JSON body in the request is malformed.
for example
returns
It requires PHP 5.3 and above
Update
Restler 2.0.6 adds error support for older versions of PHP 5
So help.luracast.com/restler/examples which is using PHP 5.2.17 will return the following response for cURL