Class: Instapaper::HTTP::Headers

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

Instance Method Summary collapse

Constructor Details

#initialize(client, request_method, url, options = {}) ⇒ Headers

Returns a new instance of Headers.


8
9
10
11
12
13
# File 'lib/instapaper/http/headers.rb', line 8

def initialize(client, request_method, url, options = {})
  @client = client
  @request_method = request_method.to_sym
  @uri = Addressable::URI.parse(url)
  @options = options
end

Instance Method Details

#request_headersObject


15
16
17
18
19
20
# File 'lib/instapaper/http/headers.rb', line 15

def request_headers
  {
    user_agent: @client.user_agent,
    authorization: oauth_header,
  }
end