Merge pull request #6 from voran/develop
Set charset to utf-8 when sending JSON data.
diff --git a/lib/predictionio/connection.rb b/lib/predictionio/connection.rb
index 0159bc0..205d291 100644
--- a/lib/predictionio/connection.rb
+++ b/lib/predictionio/connection.rb
@@ -45,7 +45,7 @@
http_req = Net::HTTP::Post.new("#{uri.path}#{request.path}")
http_req.set_form_data(request.params)
else
- http_req = Net::HTTP::Post.new("#{uri.path}#{request.path}", initheader = { 'Content-Type' => 'application/json' })
+ http_req = Net::HTTP::Post.new("#{uri.path}#{request.path}", initheader = { 'Content-Type' => 'application/json; charset=utf-8' })
http_req.body = request.params
end
begin