Improve this Doc

Error: $http:baddata
Bad JSON Data

Data must be a valid JSON object. Received: "{0}". Parse error: "{1}"

Description

The default transformResponse will try to parse the response as JSON if the Content-Type header is application/json, or the response looks like a valid JSON-stringified object or array. This error occurs when that data is not a valid JSON object.

To resolve this error, make sure you pass valid JSON data to transformResponse. If the response data looks like JSON, but has a different Content-Type header, you must implement your own response transformer on a per request basis, or modify the default $http responseTransform.