Method: Blazer::SlackNotifier.post_api
- Defined in:
- lib/blazer/slack_notifier.rb
.post_api(url, payload, headers) ⇒ Object
85 86 87 88 89 90 91 92 |
# File 'lib/blazer/slack_notifier.rb', line 85 def self.post_api(url, payload, headers) uri = URI.parse(url) http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = true http.open_timeout = 3 http.read_timeout = 5 http.post(uri.request_uri, payload.to_json, headers) end |