Class: NuHttp::Request
- Inherits:
-
Object
- Object
- NuHttp::Request
- Defined in:
- lib/nuhttp/context.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#method ⇒ Object
readonly
Returns the value of attribute method.
-
#params ⇒ Object
: ParamsT.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#query ⇒ Object
readonly
Returns the value of attribute query.
Instance Method Summary collapse
-
#initialize(method:, path:, query:, headers: {}, body:) ⇒ Request
constructor
A new instance of Request.
Constructor Details
#initialize(method:, path:, query:, headers: {}, body:) ⇒ Request
Returns a new instance of Request.
77 78 79 80 81 82 83 84 85 86 |
# File 'lib/nuhttp/context.rb', line 77 def initialize(method:, path:, query:, headers: {}, body:) @method = method @path = path @query = query @headers = headers @body = body @params = {} end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
74 75 76 |
# File 'lib/nuhttp/context.rb', line 74 def body @body end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
74 75 76 |
# File 'lib/nuhttp/context.rb', line 74 def headers @headers end |
#method ⇒ Object (readonly)
Returns the value of attribute method.
74 75 76 |
# File 'lib/nuhttp/context.rb', line 74 def method @method end |
#params ⇒ Object
: ParamsT
75 76 77 |
# File 'lib/nuhttp/context.rb', line 75 def params @params end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
74 75 76 |
# File 'lib/nuhttp/context.rb', line 74 def path @path end |
#query ⇒ Object (readonly)
Returns the value of attribute query.
74 75 76 |
# File 'lib/nuhttp/context.rb', line 74 def query @query end |