Class: HttpServer::Request
Overview
Classes -------------------------------------------------
Instance Attribute Summary (collapse)
-
- (Object) data
readonly
Returns the value of attribute data.
-
- (Object) header
readonly
Returns the value of attribute header.
-
- (Object) method
readonly
Returns the value of attribute method.
-
- (Object) path
readonly
Returns the value of attribute path.
-
- (Object) proto
readonly
Returns the value of attribute proto.
Instance Method Summary (collapse)
- - (Object) content_length
-
- (Request) initialize(data, method = nil, path = nil, proto = nil)
constructor
A new instance of Request.
Constructor Details
- (Request) initialize(data, method = nil, path = nil, proto = nil)
A new instance of Request
53 54 55 56 |
# File 'lib/xmlrpc/httpserver.rb', line 53 def initialize(data, method=nil, path=nil, proto=nil) @header, @data = Table.new, data @method, @path, @proto = method, path, proto end |
Instance Attribute Details
- (Object) data (readonly)
Returns the value of attribute data
51 52 53 |
# File 'lib/xmlrpc/httpserver.rb', line 51 def data @data end |
- (Object) header (readonly)
Returns the value of attribute header
51 52 53 |
# File 'lib/xmlrpc/httpserver.rb', line 51 def header @header end |
- (Object) method (readonly)
Returns the value of attribute method
51 52 53 |
# File 'lib/xmlrpc/httpserver.rb', line 51 def method @method end |
- (Object) path (readonly)
Returns the value of attribute path
51 52 53 |
# File 'lib/xmlrpc/httpserver.rb', line 51 def path @path end |
- (Object) proto (readonly)
Returns the value of attribute proto
51 52 53 |
# File 'lib/xmlrpc/httpserver.rb', line 51 def proto @proto end |
Instance Method Details
- (Object) content_length
58 59 60 61 62 |
# File 'lib/xmlrpc/httpserver.rb', line 58 def content_length len = @header['Content-Length'] return nil if len.nil? return len.to_i end |