Class: VerifyKit::Client
- Inherits:
-
VerifyKit::Core::Service
- Object
- VerifyKit::Core::Service
- VerifyKit::Client
- Defined in:
- lib/verify_kit/client.rb
Constant Summary collapse
- BASE_URL =
'https://web-rest.verifykit.com'
- SERVER_KEY_HEADER =
'X-Vfk-Server-Key'
Instance Method Summary collapse
Instance Method Details
#connection ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/verify_kit/client.rb', line 14 def connection @connection ||= Faraday.new(connection_url) do |conn| conn.headers[SERVER_KEY_HEADER] = server_key conn.request :json conn.response :json, content_type: 'application/json' conn.adapter adapter if VerifyKit.config.debug.enabled conn.response :logger, VerifyKit.config.logger, body: true, bodies: { request: true, response: true } end end end |