Class: Fiesta::Slack
- Inherits:
-
Object
- Object
- Fiesta::Slack
- Defined in:
- lib/fiesta/slack.rb
Instance Method Summary collapse
Instance Method Details
#post ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/fiesta/slack.rb', line 10 def post uri = URI(webhook) req = Net::HTTP::Post.new(uri) req.content_type = "application/json" req.body = payload.to_json Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) } end |