cozy / cozy-browser-sdk

Cozy Data System client for the browser
http://dev.cozy.io
MIT License
7 stars 12 forks source link

Treat response type as JSON #17

Closed m4dz closed 8 years ago

m4dz commented 8 years ago

When perfoming a request, the documentation recommand to do a items = JSON.parse('' + res) to get the JSONified result. As long as the expected result is always a JSON object, this post-treatment should be done by the SDK, not the app itself.

flyingrub commented 8 years ago

https://github.com/cozy/cozy-browser-sdk/commit/2686fe6ecf0883ef5e44c5510eb2e882220d7020 fixes it.