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 request content-encoding: gzip header.

for step 1 can utilize js library. few examples:

js-deflate gzip-js pako

for 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

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -