class Gazouillis::Request
Constants
- CRLF
Attributes
host[R]
method[R]
oauth[R]
path[R]
Public Class Methods
new(path, options)
click to toggle source
Calls superclass method
# File lib/gazouillis/request.rb, line 7 def initialize(path, options) @host, @path, @method = options[:host], path, options[:method] @oauth = options[:oauth] super(request) end
Private Instance Methods
full_url()
click to toggle source
# File lib/gazouillis/request.rb, line 29 def full_url "https://#{host}#{path}" end
oauth_header()
click to toggle source
# File lib/gazouillis/request.rb, line 25 def oauth_header SimpleOAuth::Header.new method, full_url, {}, oauth end
request()
click to toggle source
# File lib/gazouillis/request.rb, line 15 def request [ "#{method} #{path} HTTP/1.1", "Host: #{host}", "User-Agent: Gazouillis #{Gazouillis::VERSION}", "Authorization: #{oauth_header}", CRLF ].join(CRLF) end