Search code examples
cloudantmsgpack

Msgpack on Cloudant


I am trying to use msgpack with Cloudant, and I couldn't find any documentation on it.

2 years ago, Tim Anglade present msgpack as a wonderfull way to pack your data instead of JSON. I was thinking that now it was stable to post some msgpack data out of the box (like the Tim fork of couchDB seems to do).

Here my try in python:

 import requests, msgpack
 requests.post("https://me.cloudant.com/mydb",
        data=msgpack.packb({ "type"="Test", "ok" : True }),
        auth=(username, password),
        headers={
            "Content-Type" : "application/x-msgpack"
        })

I get an Unsupported Media Type, Content-Type must be application/jsonresponse...

Do you have any solutions, or suggestion for compressing my data ? We are pushing a huge amount of data from a mobile app, and we really need to stay small.


Solution

  • So, I get a response from Cloudant, it's simply not possible to use MsgPack to transfert my datas.

    It looks like 'Content-Type:application/msgpack' is not supported by Cloudant and there is no development work currently being done to do so. Sorry for any inconvenience this may cause.

    It looks like there is no way of encoding data in a more efficient way than JSON, that sad.