lib/grenache/http.rb in grenache-ruby-http-0.1.0 vs lib/grenache/http.rb in grenache-ruby-http-0.1.1
- old
+ new
@@ -23,10 +23,10 @@
if services.size > 0
json = Oj.dump(payload)
service = services.sample.sub("tcp://","http://")
service.prepend("http://") unless service.start_with?("http://")
resp = HTTParty.post(service,{body: json})
- return [nil, resp.body]
+ return [nil, Oj.load(resp.body)]
else
return ["NoPeerFound",nil]
end
rescue Exception => e
return [e, nil]