Class: HTTP::Client
- Inherits:
-
Object
- Object
- HTTP::Client
- Defined in:
- lib/http/http.rb
Class Method Summary collapse
- .base_uri ⇒ Object
- .base_uri=(value) ⇒ Object
- .basic_auth(u, v) ⇒ Object
- .get(path, options = {}) ⇒ Object
- .options ⇒ Object
- .post(path, options = {}) ⇒ Object
Class Method Details
.base_uri ⇒ Object
38 39 40 |
# File 'lib/http/http.rb', line 38 def base_uri Basement.[:base_uri].sub 'http://', '' end |
.base_uri=(value) ⇒ Object
24 25 26 |
# File 'lib/http/http.rb', line 24 def base_uri=(value) Basement.base_uri value end |
.basic_auth(u, v) ⇒ Object
42 43 44 |
# File 'lib/http/http.rb', line 42 def basic_auth(u, v) Basement.basic_auth u, v end |
.get(path, options = {}) ⇒ Object
28 29 30 31 |
# File 'lib/http/http.rb', line 28 def get(path, = {}) res = Basement.get(path, ); Response.new res.parsed_response, res.code, res.headers, res.response end |
.options ⇒ Object
46 47 48 |
# File 'lib/http/http.rb', line 46 def Basement. end |