Class: HTTP::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/http/http.rb

Class Method Summary collapse

Class Method Details

.base_uriObject



24
25
26
# File 'lib/http/http.rb', line 24

def base_uri
  Basement.default_options[:base_uri].sub 'http://', ''
end

.base_uri=(value) ⇒ Object



12
13
14
# File 'lib/http/http.rb', line 12

def base_uri=(value)
  Basement.base_uri value
end

.basic_auth(u, v) ⇒ Object



28
29
30
# File 'lib/http/http.rb', line 28

def basic_auth(u, v)
  Basement.basic_auth u, v
end

.get(path, options = {}) ⇒ Object



16
17
18
# File 'lib/http/http.rb', line 16

def get(path, options = {})
  Basement.get(path, options);
end

.optionsObject



32
33
34
# File 'lib/http/http.rb', line 32

def options
  Basement.default_options
end

.post(path, options = {}) ⇒ Object



20
21
22
# File 'lib/http/http.rb', line 20

def post(path, options = {})
  Basement.post(path, options);
end