commit | 9806ac965cb03fce90423bad3d5f771a40ac9fc1 | [log] [tgz] |
---|---|---|
author | Iblis Lin <iblis@hs.ntnu.edu.tw> | Thu May 12 20:31:10 2016 +0800 |
committer | Iblis Lin <iblis@hs.ntnu.edu.tw> | Thu May 12 20:31:10 2016 +0800 |
tree | 5b3cf9e27b0a5dafc28ee2fd75dc97087135d6d1 | |
parent | 102e663aab0a7fe4305dee866c55afcb22df6348 [diff] |
Fix HTTP Accept header for list query Given following list function ``` function(head, req) { provides('text', function(){ start({ 'headers': { 'Content-Type': 'text/plain' } }); send('Hello list!'); }); } ``` It will get HTTP 406 error, because the default Accept header is set to `application/json`. See Also: couchapp/couchapp#234
$.couch is used to communicate with a CouchDB server.
Install the dependencies:
$ bower install
Enable CORS:
curl -X PUT http://localhost:5984/_config/httpd/enable_cors -d '"true"' curl -X PUT http://localhost:5984/_config/cors/origins -d '"*"'
Restart CouchDB & open test/runner.html
in a browser to run the testsuite.