Class: Transport::JSON
Overview
Extended transport layer for http transfers. Basic authorization and JSON transfers are supported.
Instance Attribute Summary collapse
-
#auth_type ⇒ Object
readonly
Returns the value of attribute auth_type.
-
#expected_status_code ⇒ Object
readonly
Returns the value of attribute expected_status_code.
-
#password ⇒ Object
readonly
Returns the value of attribute password.
-
#username ⇒ Object
readonly
Returns the value of attribute username.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(http_method, url, options = { }) ⇒ JSON
constructor
A new instance of JSON.
- #perform ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(http_method, url, options = { }) ⇒ JSON
14 15 16 17 18 19 20 21 |
# File 'lib/transport/json.rb', line 14 def initialize(http_method, url, = { }) @options = modify_headers modify_parameters modify_body super http_method, url, @options initialize_authentication end |
Instance Attribute Details
#auth_type ⇒ Object (readonly)
Returns the value of attribute auth_type.
10 11 12 |
# File 'lib/transport/json.rb', line 10 def auth_type @auth_type end |
#expected_status_code ⇒ Object (readonly)
Returns the value of attribute expected_status_code.
9 10 11 |
# File 'lib/transport/json.rb', line 9 def expected_status_code @expected_status_code end |
#password ⇒ Object (readonly)
Returns the value of attribute password.
12 13 14 |
# File 'lib/transport/json.rb', line 12 def password @password end |
#username ⇒ Object (readonly)
Returns the value of attribute username.
11 12 13 |
# File 'lib/transport/json.rb', line 11 def username @username end |
Instance Method Details
#perform ⇒ Object
23 24 25 26 |
# File 'lib/transport/json.rb', line 23 def perform super parse_response end |