Module: Reel::RequestMixin

Included in:
Request, WebSocket
Defined in:
lib/reel/mixins.rb

Instance Method Summary collapse

Instance Method Details

#[](header) ⇒ Object



34
35
36
# File 'lib/reel/mixins.rb', line 34

def [] header
  headers[header]
end

#fragmentObject



58
59
60
# File 'lib/reel/mixins.rb', line 58

def fragment
  uri.fragment
end

#headersObject



30
31
32
# File 'lib/reel/mixins.rb', line 30

def headers
  @request_info.headers
end

#methodObject



26
27
28
# File 'lib/reel/mixins.rb', line 26

def method
  @request_info.http_method
end

#pathObject



50
51
52
# File 'lib/reel/mixins.rb', line 50

def path
  uri.path
end

#query_stringObject



54
55
56
# File 'lib/reel/mixins.rb', line 54

def query_string
  uri.query
end

#uriObject



46
47
48
# File 'lib/reel/mixins.rb', line 46

def uri
  @uri ||= URI(url)
end

#urlObject



42
43
44
# File 'lib/reel/mixins.rb', line 42

def url
  @request_info.url
end

#versionObject



38
39
40
# File 'lib/reel/mixins.rb', line 38

def version
  @request_info.http_version || HTTPVersionsMixin::DEFAULT_HTTP_VERSION
end