require 'json' require 'ostruct' require 'unirest' require "resolv-replace.rb" class UnirestParser def self.parse(url) response = Unirest.get "https://jsonwhois.com/api/v1/whois", headers:{ "Accept" => "application/json", "Authorization" => "Token token=4514034cfe7c71a79dbe105ab3e1c6b3" }, parameters:{ "domain" => url } return JSON.pretty_generate(response.body) end end