Class: Mastodon::Headers

Inherits:
Object
  • Object
show all
Defined in:
lib/mastodon/headers.rb

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Headers

Returns a new instance of Headers.

Parameters:



4
5
6
# File 'lib/mastodon/headers.rb', line 4

def initialize(client)
  @client = client
end

Instance Method Details

#request_headersHash

Returns:

  • (Hash)


9
10
11
12
13
14
15
# File 'lib/mastodon/headers.rb', line 9

def request_headers
  {
    user_agent: @client.user_agent,
    accept: '*/*',
    authorization: "Bearer #{@client.bearer_token}",
  }
end