couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kxe...@apache.org
Subject [39/50] jquery-couch commit: updated refs/heads/import-master to 66dbcbf
Date Tue, 01 Apr 2014 08:52:44 GMT
COUCHDB-1156 - send Accept header so Futon doesn't display HTML where it expects JSON (Thanks
Dale Harvey for patch)

git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1101786 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/couchdb-jquery-couch/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-jquery-couch/commit/394922e6
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-jquery-couch/tree/394922e6
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-jquery-couch/diff/394922e6

Branch: refs/heads/import-master
Commit: 394922e683d9560dd62203b86294e9778c290384
Parents: c959bfe
Author: Robert Newson <rnewson@apache.org>
Authored: Wed May 11 08:45:54 2011 +0000
Committer: Alexander Shorin <kxepal@gmail.com>
Committed: Wed May 11 08:45:54 2011 +0000

----------------------------------------------------------------------
 jquery.couch.js | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-jquery-couch/blob/394922e6/jquery.couch.js
----------------------------------------------------------------------
diff --git a/jquery.couch.js b/jquery.couch.js
index 3cec9b8..744a78a 100644
--- a/jquery.couch.js
+++ b/jquery.couch.js
@@ -1005,8 +1005,14 @@
    * @private
    */
   function ajax(obj, options, errorMessage, ajaxOptions) {
+
+    var defaultAjaxOpts = {
+      contentType: "application/json",
+      headers:{"Accept": "application/json"}
+    };
+
     options = $.extend({successStatus: 200}, options);
-    ajaxOptions = $.extend({contentType: "application/json"}, ajaxOptions);
+    ajaxOptions = $.extend(defaultAjaxOpts, ajaxOptions);
     errorMessage = errorMessage || "Unknown error";
     $.ajax($.extend($.extend({
       type: "GET", dataType: "json", cache : !$.browser.msie,


Mime
View raw message