lib/sniffer/adapters/net_http_adapter.rb in sniffer-0.3.2 vs lib/sniffer/adapters/net_http_adapter.rb in sniffer-0.4.0
- old
+ new
@@ -36,15 +36,15 @@
data_item.response = Sniffer::DataItem::Response.new(status: @response.code.to_i,
headers: @response.each_header.collect.to_h,
body: @response.body.to_s,
timing: bm)
- data_item.log
+ Sniffer.notify_response(data_item)
end
@response
end
# rubocop:enable Metrics/AbcSize, Metrics/MethodLength
end
end
end
-Net::HTTP.send(:include, Sniffer::Adapters::NetHttpAdapter)
+Net::HTTP.include Sniffer::Adapters::NetHttpAdapter