Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

The request method should allow functions in body to be able to save design docs correctly #24

Open
anton-107 opened this Issue · 0 comments

1 participant

@anton-107

Example request:
databaseClient.request("PUT", designName, designDoc, function(err, data) {} );

Design doc contains functions and they are cut off internally by JSON.stringify. Please, enhance this line:

body = JSON.stringify(body)

with this snippet:

body = JSON.stringify(body, function(key, val) {
  if (typeof val == 'function') {
    return val.toString();
  }
  return val;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.