mamund / Building-Hypermedia-APIs

Source code for the O'Reilly book of the same name
http://amundsen.com/hypermedia/
77 stars 37 forks source link

couchdb won't automatically stringify JSON responses #4

Open othiym23 opened 12 years ago

othiym23 commented 12 years ago

Probably a change in the last few releases of Couch, but in any case, had to make this change to get the scripts running properly.

BigBlueHat commented 8 years ago

Another option is to change the body key to json and CouchDB will Do The Right Thing with the object passed in and set the response header: http://docs.couchdb.org/en/1.6.1/json-structure.html#response-object