Class: Fbe::Graph::HTTP
- Inherits:
-
GraphQL::Client::HTTP
- Object
- GraphQL::Client::HTTP
- Fbe::Graph::HTTP
- Defined in:
- lib/fbe/github_graph.rb
Overview
The HTTP class
Instance Method Summary collapse
- #headers(_context) ⇒ Object
-
#initialize(token, host) ⇒ HTTP
constructor
A new instance of HTTP.
Constructor Details
#initialize(token, host) ⇒ HTTP
Returns a new instance of HTTP.
120 121 122 123 |
# File 'lib/fbe/github_graph.rb', line 120 def initialize(token, host) @token = token super("https://#{host}/graphql") end |
Instance Method Details
#headers(_context) ⇒ Object
125 126 127 |
# File 'lib/fbe/github_graph.rb', line 125 def headers(_context) { Authorization: "Bearer #{@token}" } end |