def url_request(url)
      uri = URI.parse(url)
      http = Net::HTTP.new(uri.host, uri.port)
      http.use_ssl = true
      http.verify_mode = ::OpenSSL::SSL::VERIFY_NONE

      request = Net::HTTP::Get.new(uri.request_uri)

      response = http.request(request)
      raise ArgumentError, "Fail to get response of #{url}" unless %w[200 302].include?(response.code)

      response.code == '302' ? response['location'] : response.body
    rescue NoMethodError, SocketError, ArgumentError => e
      OneGadget::Logger.error(e.message)
      nil
    end
def url_request(url)
      uri = URI.parse(url)
      http = Net::HTTP.new(uri.host, uri.port)
      http.use_ssl = true
      http.verify_mode = ::OpenSSL::SSL::VERIFY_NONE

      request = Net::HTTP::Get.new(uri.request_uri)

      response = http.request(request)
      raise ArgumentError, "Fail to get response of #{url}" unless %w[200 302].include?(response.code)

      response.code == '302' ? response['location'] : response.body
    rescue NoMethodError, SocketError, ArgumentError => e
      OneGadget::Logger.error(e.message)
      nil
    end
Get request.
 @param [String] url The url.
 @return [String]
   The request response body.
   If the response is +302 Found+, returns the location in header.