class Noder::HTTP::Request

Attributes

env[R]
params[RW]

Public Class Methods

new(env) click to toggle source
# File lib/noder/http/request.rb, line 7
def initialize(env)
  @env = env
  @query = HTTP::Utils.parse(env[:query_string])
  @params = @query
  if env[:post_content] && env[:post_content] != ''
    @params.merge!(HTTP::Utils.parse(env[:post_content]))
  end
end

Public Instance Methods

content_type() click to toggle source
# File lib/noder/http/request.rb, line 28
def content_type
  env[:content_type]
end
headers() click to toggle source
# File lib/noder/http/request.rb, line 16
def headers
  @headers ||= HTTP::Utils.parse_headers(env[:headers])
end
ip() click to toggle source
# File lib/noder/http/request.rb, line 48
def ip
  env[:ip]
end
post_content() click to toggle source
# File lib/noder/http/request.rb, line 40
def post_content
  env[:post_content]
end
protocol() click to toggle source
# File lib/noder/http/request.rb, line 44
def protocol
  env[:protocol]
end
query_string() click to toggle source
# File lib/noder/http/request.rb, line 36
def query_string
  env[:query_string]
end
request_method() click to toggle source
# File lib/noder/http/request.rb, line 20
def request_method
  env[:request_method]
end
request_uri() click to toggle source
# File lib/noder/http/request.rb, line 32
def request_uri
  env[:request_uri]
end