Class: UU::OS::HTTP::HTTPMethod
- Inherits:
-
Object
- Object
- UU::OS::HTTP::HTTPMethod
- Defined in:
- uu_os_connection-2.2.4/lib/uu/os/http/http_method.rb
Overview
Generic ancestor for HTTP methods.
Instance Attribute Summary (collapse)
-
- (UU::OS::HTTP::HTTPHeaders) headers
readonly
Custom method headers.
-
- (Symbol) method
readonly
Actual method type (POST, GET, etc).
-
- (UU::OS::HTTP::HTTPQuery) parameters
readonly
Query parameters.
-
- (String) path
readonly
Method path.
Instance Method Summary (collapse)
-
- (HTTPMethod) set_header(name, *value)
Sets custom header.
-
- (HTTPMethod) set_parameter(name, value)
Sets query parameter.
Instance Attribute Details
- (UU::OS::HTTP::HTTPHeaders) headers (readonly)
Custom method headers.
23 24 25 |
# File 'uu_os_connection-2.2.4/lib/uu/os/http/http_method.rb', line 23 def headers @headers end |
- (Symbol) method (readonly)
Actual method type (POST, GET, etc).
15 16 17 |
# File 'uu_os_connection-2.2.4/lib/uu/os/http/http_method.rb', line 15 def method @method end |
- (UU::OS::HTTP::HTTPQuery) parameters (readonly)
Query parameters.
27 28 29 |
# File 'uu_os_connection-2.2.4/lib/uu/os/http/http_method.rb', line 27 def parameters @parameters end |
- (String) path (readonly)
Method path.
19 20 21 |
# File 'uu_os_connection-2.2.4/lib/uu/os/http/http_method.rb', line 19 def path @path end |
Instance Method Details
- (HTTPMethod) set_header(name, *value)
Sets custom header.
46 47 48 49 |
# File 'uu_os_connection-2.2.4/lib/uu/os/http/http_method.rb', line 46 def set_header(name, *value) headers[name] = value return self end |
- (HTTPMethod) set_parameter(name, value)
Sets query parameter.
55 56 57 58 |
# File 'uu_os_connection-2.2.4/lib/uu/os/http/http_method.rb', line 55 def set_parameter(name, value) parameters[name] = value return self end |