diff options
author | Damien F. Katz <damien@apache.org> | 2008-05-19 19:20:19 +0000 |
---|---|---|
committer | Damien F. Katz <damien@apache.org> | 2008-05-19 19:20:19 +0000 |
commit | 55ee8c7f9188443900c52a69ae408bcf457be62a (patch) | |
tree | e98a332b9b43208f4d7494ac357c51df81866b29 /share/www/script/couch.js | |
parent | 4e47fa72aedc6533bd669599e325c911b2c8c68e (diff) |
Changed temp view definition to always be jsonobjects with map/reduce source as members of the object. Everywhere we used 'text/javascript' or 'application/javascript', we now just use 'javascript'
git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@657926 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www/script/couch.js')
-rw-r--r-- | share/www/script/couch.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/share/www/script/couch.js b/share/www/script/couch.js index f72fb712..d63f1eae 100644 --- a/share/www/script/couch.js +++ b/share/www/script/couch.js @@ -98,8 +98,8 @@ function CouchDB(name) { if (typeof(mapFun) != "string") mapFun = mapFun.toSource ? mapFun.toSource() : "(" + mapFun.toString() + ")"; var req = request("POST", this.uri + "_temp_view" + encodeOptions(options), { - headers: {"Content-Type": "text/javascript"}, - body: JSON.stringify(mapFun) + headers: {"Content-Type": "application/json"}, + body: JSON.stringify({language:"javascript",map:mapFun}) }); var result = JSON.parse(req.responseText); if (req.status != 200) @@ -114,8 +114,8 @@ function CouchDB(name) { if (typeof(reduceFun) != "string") reduceFun = reduceFun.toSource ? reduceFun.toSource() : "(" + reduceFun.toString() + ")"; var req = request("POST", this.uri + "_temp_view" + encodeOptions(options), { - headers: {"Content-Type": "text/javascript"}, - body: JSON.stringify({map:mapFun, reduce:reduceFun}) + headers: {"Content-Type": "application/json"}, + body: JSON.stringify({language:"javascript",map:mapFun,reduce:reduceFun}) }); var result = JSON.parse(req.responseText); if (req.status != 200) |