Module: Transport::Common::RequestBuilder::InstanceMethods
- Defined in:
- lib/transport/common/request_builder.rb
Constant Summary collapse
- HTTP_METHODS_WITH_PARAMETERS =
[ :get, :delete, :post, :put ].freeze
- HTTP_METHODS_WITH_BODY =
[ :post, :put ].freeze
Instance Attribute Summary collapse
-
#http_method ⇒ Object
readonly
Returns the value of attribute http_method.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#uri ⇒ Object
readonly
Returns the value of attribute uri.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
Instance Attribute Details
#http_method ⇒ Object (readonly)
Returns the value of attribute http_method.
27 28 29 |
# File 'lib/transport/common/request_builder.rb', line 27 def http_method @http_method end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
29 30 31 |
# File 'lib/transport/common/request_builder.rb', line 29 def @options end |
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
30 31 32 |
# File 'lib/transport/common/request_builder.rb', line 30 def uri @uri end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
28 29 30 |
# File 'lib/transport/common/request_builder.rb', line 28 def url @url end |
Instance Method Details
#initialize(http_method, url, options = { }) ⇒ Object
32 33 34 35 |
# File 'lib/transport/common/request_builder.rb', line 32 def initialize(http_method, url, = { }) @http_method, @url, @options = http_method, url, @uri = URI.parse @url end |