Module: Barometer::Utils::Post
- Defined in:
- lib/barometer/utils/post.rb
Class Method Summary collapse
Class Method Details
.call(url, params = {}) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/barometer/utils/post.rb', line 6 def self.call(url, params={}) http = HTTPClient.new http.receive_timeout = Barometer.timeout http.post(url, default_params.merge(params)).content rescue HTTPClient::TimeoutError raise Barometer::TimeoutError end |