gzip - How to post gzipped data to CouchDB? -
gzip - How to post gzipped data to CouchDB? -
as of version 1.6.0, couchdb can take gzipped json request bodies. posting bunch of json files via browser, , beingness able compress them save lot of bandwidth. how create ajax post of gzipped json docs couchdb?
two steps:
compress json files. send ajax requestcontent-encoding: gzip
header. for step 1 can utilize js library. few examples:
js-deflate gzip-js pakofor step 2, using xmlhttprequest can do
xhr.setrequestheader("content-encoding", "gzip");
or using jquery, add
headers: {"content-encoding": "gzip"}
to ajax settings.
couchdb gzip
Comments
Post a Comment