Class: GitHub::GraphQL::Client::HTTP
- Inherits:
-
GraphQL::Client::HTTP
- Object
- GraphQL::Client::HTTP
- GitHub::GraphQL::Client::HTTP
- Defined in:
- lib/github/graphql/client.rb
Instance Method Summary collapse
- #headers(context) ⇒ Object
-
#initialize(token) ⇒ HTTP
constructor
A new instance of HTTP.
Constructor Details
#initialize(token) ⇒ HTTP
Returns a new instance of HTTP.
11 12 13 14 |
# File 'lib/github/graphql/client.rb', line 11 def initialize(token) @token = token super(GitHub::GraphQL::URL) end |
Instance Method Details
#headers(context) ⇒ Object
16 17 18 |
# File 'lib/github/graphql/client.rb', line 16 def headers(context) context.merge({"Authorization" => "bearer #{@token}"}) end |