Class: Uffizzi::HttpClient

Inherits:
Object
  • Object
show all
Defined in:
lib/uffizzi/clients/api/http_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ HttpClient

Returns a new instance of HttpClient.



10
11
12
13
14
# File 'lib/uffizzi/clients/api/http_client.rb', line 10

def initialize(params)
  @auth_cookie = params[:cookie]
  @basic_auth_user = params[:basic_auth_user]
  @basic_auth_password = params[:basic_auth_password]
end

Instance Attribute Details

Returns the value of attribute auth_cookie.



8
9
10
# File 'lib/uffizzi/clients/api/http_client.rb', line 8

def auth_cookie
  @auth_cookie
end

#basic_auth_passwordObject

Returns the value of attribute basic_auth_password.



8
9
10
# File 'lib/uffizzi/clients/api/http_client.rb', line 8

def basic_auth_password
  @basic_auth_password
end

#basic_auth_userObject

Returns the value of attribute basic_auth_user.



8
9
10
# File 'lib/uffizzi/clients/api/http_client.rb', line 8

def basic_auth_user
  @basic_auth_user
end

Instance Method Details

#make_delete_request(request_uri) ⇒ Object



28
29
30
# File 'lib/uffizzi/clients/api/http_client.rb', line 28

def make_delete_request(request_uri)
  make_request(:delete, request_uri)
end

#make_get_request(request_uri) ⇒ Object



16
17
18
# File 'lib/uffizzi/clients/api/http_client.rb', line 16

def make_get_request(request_uri)
  make_request(:get, request_uri)
end

#make_post_request(request_uri, params = {}) ⇒ Object



20
21
22
# File 'lib/uffizzi/clients/api/http_client.rb', line 20

def make_post_request(request_uri, params = {})
  make_request(:post, request_uri, params)
end

#make_put_request(request_uri, params = {}) ⇒ Object



24
25
26
# File 'lib/uffizzi/clients/api/http_client.rb', line 24

def make_put_request(request_uri, params = {})
  make_request(:put, request_uri, params)
end