Sha256: e630c0229f085d20c5cf9aa4b30b975fc401c89a91f10861e0882ea18ede4533
Contents?: true
Size: 1.01 KB
Versions: 11
Compression:
Stored size: 1.01 KB
Contents
module Slack module Web module Faraday module Connection private def connection options = { headers: { 'Accept' => 'application/json; charset=utf-8' } } options[:headers]['User-Agent'] = user_agent if user_agent options[:proxy] = proxy if proxy options[:ssl] = { ca_path: ca_path, ca_file: ca_file } ::Faraday::Connection.new(endpoint, options) do |connection| connection.use ::Faraday::Request::Multipart connection.use ::Faraday::Request::UrlEncoded connection.use ::Slack::Web::Faraday::Response::RaiseError connection.use ::FaradayMiddleware::Mashify, mash_class: Slack::Messages::Message connection.use ::FaradayMiddleware::ParseJson connection.use ::Faraday::Response::RaiseError connection.response :logger, logger if logger connection.adapter ::Faraday.default_adapter end end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems