Class: Gem::Release::Helper::Http::Client
- Inherits:
-
Struct
- Object
- Struct
- Gem::Release::Helper::Http::Client
- Defined in:
- lib/gem/release/helper/http.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#headers ⇒ Object
Returns the value of attribute headers.
-
#method ⇒ Object
Returns the value of attribute method.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body
8 9 10 |
# File 'lib/gem/release/helper/http.rb', line 8 def body @body end |
#headers ⇒ Object
Returns the value of attribute headers
8 9 10 |
# File 'lib/gem/release/helper/http.rb', line 8 def headers @headers end |
#method ⇒ Object
Returns the value of attribute method
8 9 10 |
# File 'lib/gem/release/helper/http.rb', line 8 def method @method end |
#url ⇒ Object
Returns the value of attribute url
8 9 10 |
# File 'lib/gem/release/helper/http.rb', line 8 def url @url end |
Instance Method Details
#request ⇒ Object
9 10 11 12 13 14 |
# File 'lib/gem/release/helper/http.rb', line 9 def request req = const.new(uri.request_uri, headers) req.body = body if body resp = client.request(req) [resp.code.to_i, resp.body] end |