Module: Reel::RequestMixin

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

Instance Method Summary collapse

Instance Method Details

#[](header) ⇒ Object



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

def [](header)
  headers[header]
end

#fragmentObject



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

def fragment
  uri.fragment
end

#headersObject



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

def headers
  @request_info.headers
end

#methodObject



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

def method
  @request_info.http_method
end

#pathObject



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

def path
  uri.path
end

#query_stringObject



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

def query_string
  uri.query
end

#uriObject



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

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

#urlObject



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

def url
  @request_info.url
end

#versionObject



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

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