2020-02-14 17:49:17 +00:00
|
|
|
class Webhooks::Trigger
|
|
|
|
def self.execute(url, payload)
|
2020-07-21 06:45:24 +00:00
|
|
|
RestClient.post(url, payload.to_json, { content_type: :json, accept: :json })
|
2020-08-25 17:34:02 +00:00
|
|
|
rescue RestClient::NotFound => e
|
|
|
|
Rails.logger.info "invalid url #{url} : #{e.message}"
|
2020-02-14 17:49:17 +00:00
|
|
|
rescue StandardError => e
|
|
|
|
Raven.capture_exception(e)
|
|
|
|
end
|
|
|
|
end
|