8daf1fe033
- Add down gem to handle downloading files to host machine - Remove the LocalResource class - Introduce max limit for contact avatars send via SDK
14 lines
431 B
Ruby
14 lines
431 B
Ruby
class Webhooks::Trigger
|
|
def self.execute(url, payload)
|
|
RestClient::Request.execute(
|
|
method: :post,
|
|
url: url, payload: payload.to_json,
|
|
headers: { content_type: :json, accept: :json },
|
|
timeout: 5
|
|
)
|
|
rescue *ExceptionList::REST_CLIENT_EXCEPTIONS => e
|
|
Rails.logger.info "Exception: invalid webhook url #{url} : #{e.message}"
|
|
rescue StandardError => e
|
|
Sentry.capture_exception(e)
|
|
end
|
|
end
|