400 response when trying to add a contact or group
- New instance on enterprise.dreamfactory.com
- Followed the configuration procedure from the readme file.
- Registered as a new user via the app
Now, when I try to add a contact or a group, the POST request is sent but the response is a 400 with the message: No record(s) detected in request.
Ok, did some investigations.
The request sent by this webapp has this payload (for adding new group):
{"name":"test"}
It seems like the backend expects the payload to be wrapped in another array. When (using cUrl) I issue a similar request but with the following payload, the request is successful and a new record is created:
{"resource":{"name":"test"}}
Any plan on fixing the package?
Any records that you POST must be wrapped in a resource. This is how the DreamFactory API works and is documented on the wiki.
I understand that, but the sample application package is broken. That was my point.
Oh, I'm sorry, I didn't see you mention the sample application in your original message. Which sample application is exhibiting this behaviour?
We're working on it. Package file will be rebuilt.
Fixed in release 1.0.4.