lib/city_watch/util/collector.rb in city-watch-0.7.5 vs lib/city_watch/util/collector.rb in city-watch-0.7.6
- old
+ new
@@ -16,13 +16,14 @@
end
end
req = Net::HTTP::Post.new(uri.path)
req.body = Yajl::Encoder.encode(dat)
req["Content-Type"] = 'application/json'
- case http.request(req)
+ case resp = http.request(req)
when Net::HTTPSuccess
puts "Successfully sent to collector." if CityWatch.debug?
else
+ puts resp.inspect
raise Exception
end
end
def self.process(data)
\ No newline at end of file