Module: WrAPI::Connection

Included in:
API
Defined in:
lib/wrapi/connection.rb

Overview

The Connection module provides methods to establish and configure a Faraday connection. It includes private methods to set up options, authorization, headers, and logging for the connection. By default

  • Bearer authorization is access_token is not nil override with @setup_authorization

  • Headers setup for client-id and client-secret when client_id and client_secret are not nil @setup_headers

Methods:

  • connection: Establishes a Faraday connection with the configured options, authorization, headers, and logging.

  • setup_options: Sets up the options for the Faraday connection, including headers and URL.

  • setup_authorization: Configures the authorization header for the Faraday connection.

  • setup_headers: Configures additional headers for the Faraday connection.

  • setup_logger_filtering: Sets up logging and filtering for sensitive information in the Faraday connection.