module Slack::Web::Faraday::Request
Public Instance Methods
delete(path, options = {})
click to toggle source
# File lib/slack/web/faraday/request.rb, line 17 def delete(path, options = {}) request(:delete, path, options) end
get(path, options = {})
click to toggle source
# File lib/slack/web/faraday/request.rb, line 5 def get(path, options = {}) request(:get, path, options) end
post(path, options = {})
click to toggle source
# File lib/slack/web/faraday/request.rb, line 9 def post(path, options = {}) request(:post, path, options) end
put(path, options = {})
click to toggle source
# File lib/slack/web/faraday/request.rb, line 13 def put(path, options = {}) request(:put, path, options) end
Private Instance Methods
request(method, path, options)
click to toggle source
# File lib/slack/web/faraday/request.rb, line 23 def request(method, path, options) options = options.merge(token: token) response = connection.send(method) do |request| case method when :get, :delete request.url(path, options) when :post, :put request.path = path request.body = options unless options.empty? end end response.body end