POST error on Internet of Things Hardware Platform


#1

Hi,
I have Texas Instruments embedded wifi device which can send the data to dreamfactory server. I’m using TI’s CC3100 embedded WiFi modue to connect to server.
I have installed the Dreamfactor server on repowersagar.com. Below is the POST query to get sessions ID

POST Request to Sparkfan:
POST /rest/user/session HTTP/1.1
Host:repowersagar.com
Content-Type:application/json
X-DreamFactory-Application-Name: malnad
Content-Length:45
email:clhpra
***@gmail.com,password:******

Bleow is the response from Dream Factory Server

HTTP/1.1 500 Internal Server Error
Date: Sun, 07 Sep 2014 14:47:25 GMT
Server: Apache/2.4.7 (Ubuntu)
X-Powered-By: PHP/5.5.9-1ubuntu4.3
Set-Cookie: PHPSESSID=9i9qcsp75svp1v7t8001q91pv3; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
P3P: CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"
Content-Length: 77
Content-Type: application/json; charset=utf-8
Connection: close
{“error”:[{“message”:“JSON Error: Syntax error, malformed JSON”,“code”:500}]}

Any idea what I’m doing wrong ?


#2

Malformed JSON, are not passing JSON at all.

Check out the API Docs session to see valid payload schema.

Here’s login

{
"email": "",
"password": "",
"duration": 0
}