Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Implement msgpack support #176

wants to merge 2 commits into


None yet
2 participants

rasky commented Nov 8, 2013

This patch implements support for msgpack (http://msgpack.org).

MsgPack is a binary transport for schemaless data structures. It can be thought as a binary serialization of JSON, though this is not formally a correct definition. MsgPack is very popular in Japan and is increasingly used as a compact serialization / data storage format.

The present patch makes httpie understands the "application/x-msgpack" content type, and decode it appropriately to the standard output. It is very useful when working with an API that implements this serialization format.

Testsuite is OK after this patch is applied.

rasky added some commits Nov 8, 2013

Make way for content types with binary data.
To support content types with binary data, there are
two different modifications needed:

1) We need to postpone response body decoding into unicode until
the output processor is run. Making it before (with the 'replace'
substitution policy) would mean scrambling the binary data.
2) We need to postpone the binary check (used for output
suppression) until the output processors have run. In fact, binary
processors might decode the data into something readable that
doesn't need to be suppressed.

@jakubroztocil jakubroztocil referenced this pull request Nov 8, 2013


Generic plugin API (for output processors and such) #177

1 of 5 tasks complete

jakubroztocil commented Nov 8, 2013

Thanks, @rasky! It looks useful. It would be better to have this as a plugin though since it has an external dependency. I'm already planning on adding a plugin API also for output processors like this one. See #177.

rasky commented Nov 8, 2013

OK I'm happy to adapt the code once you have the plugin API out for this. Let me know how it goes.

rasky commented Dec 4, 2014

Resubmitted as #284

@rasky rasky closed this Dec 4, 2014

@rasky rasky deleted the rasky:msgpack branch Dec 4, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment