Class: ServiceNow::Connection
- Inherits:
-
Object
- Object
- ServiceNow::Connection
- Defined in:
- lib/servicenow/connection.rb
Instance Method Summary collapse
-
#initialize(instance_id, token) ⇒ Connection
constructor
A new instance of Connection.
Constructor Details
#initialize(instance_id, token) ⇒ Connection
Returns a new instance of Connection.
8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/servicenow/connection.rb', line 8 def initialize(instance_id, token) @instance_id = instance_id @token = token @connection = Faraday::Connection.new() do |conn| conn.use HttpErrors conn. :Bearer, @token conn.request :json conn.response :json conn.adapter Faraday.default_adapter end end |