And too the list this time :$ ----
Hi Sergey, On 16 Nov 2011, at 10:48, sergey wrote: > Hi! > How to set content type for store operation for java-pcb client? > b.store("key", "{"field":"value"}") - set content as text/plain, how set > content type as application/json? That is just a convenience method. behind the scenes it creates an IRiakObject with the value you pass and a content-type of "text/plain". If you wish to store JSON, create an IRiakObject, set it's value and content-type and store that. Use the RiakObjectBuilder class to create your riak object. Or create some java bean type instance and store that (and have the client automatically convert it to a JSON payload for you, it uses Jackson for this.) > and how store binary data(image)? Same as above, create an IRiakObject, set its value to the byte[] of your image and set its content-type and store that. Cheers Russell > > _______________________________________________ > riak-users mailing list > riak-users@lists.basho.com > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
_______________________________________________ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com