require 'net/http' require 'rubygems' require 'json' # "can't" using http://www.fileformat.info/info/unicode/char/2019/index.htm cant = {:data=>[?c, ?a, ?n, 0x2019, ?t].pack("U*")} puts cant.to_json http = Net::HTTP.new("localhost",8888) puts http.put('/foo','') begin puts http.put('/foo/0', cant.to_json) puts http.get('/foo/0') ensure puts http.delete('/foo') end