Sha256: c40f083465cadc53b138050147027e7e79c5a025777da51ba34277b679195d4e
Contents?: true
Size: 967 Bytes
Versions: 9
Compression:
Stored size: 967 Bytes
Contents
module Wazuh module Sawyer module Connection private def connection options = { headers: { 'Accept' => 'application/json; charset=utf-8', 'Content-Type' => 'application/json' }, ssl: {} } options[:headers]['User-Agent'] = user_agent if user_agent options[:ssl].merge!({ client_cert: client_cert, client_key: client_key }) if client_cert || client_key if basic_user || basic_password authorization_header = "Basic " + Base64.encode64(basic_user + ':' + basic_password).strip options[:headers].merge!({'Authorization' => authorization_header}) end options[:ssl].merge!({ verify: false }) unless verify_ssl opts = { :links_parser => ::Sawyer::LinkParsers::Simple.new } opts[:faraday] = ::Faraday.new(options) ::Sawyer::Agent.new(endpoint, opts) end end end end
Version data entries
9 entries across 9 versions & 1 rubygems