benoitc  committed b70e8cf

allow CouchdbResource to return raw json by setting _raw_json to True in
args when needed.

  • Participants
  • Parent commits 5d45b42

Comments (0)

Files changed (1)

File couchdbkit/

         return self.request('COPY', path=path, headers=headers, **params)
     def request(self, method, path=None, payload=None, headers=None, 
-         _stream=False, _stream_size=16384, **params):
+         _stream=False, _stream_size=16384, _raw_json=False, **params):
         """ Perform HTTP call to the couchdb server and manage 
         JSON conversions, support GET, POST, PUT and DELETE.
         response = self.get_response()
-        if data and response.get('content-type') == 'application/json':
+        if data and response.get('content-type') == 'application/json' \
+                and not _raw_json:
                 data = anyjson.deserialize(data)
             except ValueError: