Class: Line::Bot::Headers
- Inherits:
-
Object
- Object
- Line::Bot::Headers
- Defined in:
- lib/line/bot/headers.rb
Instance Method Summary (collapse)
-
- (Headers) initialize(client, request_method, url, options = {})
constructor
A new instance of Headers.
- - (Object) request_headers
Constructor Details
- (Headers) initialize(client, request_method, url, options = {})
Returns a new instance of Headers
4 5 6 7 8 9 |
# File 'lib/line/bot/headers.rb', line 4 def initialize(client, request_method, url, = {}) @client = client @request_method = request_method.to_sym @uri = URI(url) @options = end |
Instance Method Details
- (Object) request_headers
11 12 13 14 15 16 17 18 19 |
# File 'lib/line/bot/headers.rb', line 11 def request_headers { 'User-Agent' => @client.user_agent, 'Content-Type' => 'application/json; charset=UTF-8', 'X-Line-ChannelID' => @client.channel_id, 'X-Line-ChannelSecret' => @client.channel_secret, 'X-Line-Trusted-User-With-ACL' => @client.channel_mid } end |