Multiple representations of an object with GET
sean at basho.com
Fri Apr 8 08:48:39 EDT 2011
Riak does not automatically convert content-types for you. As far as it's concerned, the content of your object is opaque. To do this, you would need to implement your own webmachine resource and either install it into Riak, or put it as a small application in front that uses the riak-erlang-client.
Sean Cribbs <sean at basho.com>
Basho Technologies, Inc.
On Apr 8, 2011, at 4:20 AM, Damian Dobroczyński wrote:
> Hi list!
> I do not want to dig deep in the Riak source code now, so I'm sking this
> question here. These are my needs:
> - objects are stored as Erlang terms (say as gb_tree or proplists)
> - GET with "accept" header set to "application/json" returns JSON
> - GET with "accept" header set to "application/x-erlang-binary" returns
> Erlang binary
> - GET with "accept" header set to "application/xml" returns some XML
> - GET with "accept" header set to "plain/text" returns text representation
> Is it possible to create a "represention" hook without modification the
> current source code of the webmachine callback modules? Is there a fork
> of the code related to this issue?
> -- D.
> riak-users mailing list
> riak-users at lists.basho.com
More information about the riak-users