lib/shodanz/apis/streaming.rb in shodanz-2.0.2 vs lib/shodanz/apis/streaming.rb in shodanz-2.0.3
- old
+ new
@@ -26,10 +26,10 @@
URL = 'https://stream.shodan.io/'
# @param key [String] SHODAN API key, defaulted to the *SHODAN_API_KEY* enviroment variable.
def initialize(key: ENV['SHODAN_API_KEY'])
@url = URL
- @internet = Async::HTTP::Internet.new
+ @client = Async::HTTP::Client.new(Async::HTTP::Endpoint.parse(@url))
self.key = key
warn 'No key has been found or provided!' unless key?
end