class Dingding::Notifier::Util::HTTPClient
Attributes
params[R]
uri[R]
Public Class Methods
new(uri, params)
click to toggle source
# File lib/dingding-notifier/util/http_client.rb, line 35 def initialize uri, params @uri = uri @params = params end
post(uri, params)
click to toggle source
# File lib/dingding-notifier/util/http_client.rb, line 28 def post uri, params HTTPClient.new(uri, params).call end
Public Instance Methods
call()
click to toggle source
rubocop:disable Layout/IndentHeredoc
# File lib/dingding-notifier/util/http_client.rb, line 41 def call response = Faraday.post(uri, params,{"Content-Type" => "application/json"}) # http_obj.request(request_obj).tap do |response| # unless response.is_a?(Net::HTTPSuccess) # raise Dingding::Notifier::APIError.new(response) # end # end end