lib/mihari/emitters/webhook.rb in mihari-3.12.0 vs lib/mihari/emitters/webhook.rb in mihari-4.0.0

- old
+ new

@@ -1,11 +1,7 @@ # frozen_string_literal: true -require "json" -require "net/http" -require "uri" - module Mihari module Emitters class Webhook < Base # @return [Boolean] def valid? @@ -13,10 +9,10 @@ end def emit(title:, description:, artifacts:, source:, tags:) return if artifacts.empty? - uri = URI(Mihari.config.webhook_url) + uri = Addressable::URI.parse(Mihari.config.webhook_url) data = { title: title, description: description, artifacts: artifacts.map(&:data), source: source,