Class: HelperModule::SimpleRequestHelper
- Inherits:
-
Object
- Object
- HelperModule::SimpleRequestHelper
show all
- Defined in:
- lib/helpers/simple_http_helper.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
12
13
14
|
# File 'lib/helpers/simple_http_helper.rb', line 12
def initialize(host, port, path)
@host, @port, @path = host, port, path
end
|
Instance Attribute Details
#_debug ⇒ Object
Returns the value of attribute _debug.
10
11
12
|
# File 'lib/helpers/simple_http_helper.rb', line 10
def _debug
@_debug
end
|
#host ⇒ Object
Returns the value of attribute host.
9
10
11
|
# File 'lib/helpers/simple_http_helper.rb', line 9
def host
@host
end
|
#path ⇒ Object
Returns the value of attribute path.
9
10
11
|
# File 'lib/helpers/simple_http_helper.rb', line 9
def path
@path
end
|
#port ⇒ Object
Returns the value of attribute port.
9
10
11
|
# File 'lib/helpers/simple_http_helper.rb', line 9
def port
@port
end
|
Instance Method Details
#_create_request_sender(host, port) ⇒ Object
26
27
28
|
# File 'lib/helpers/simple_http_helper.rb', line 26
def _create_request_sender(host, port)
raise NotImplementedError
end
|
#_request_prefix ⇒ Object
22
23
24
|
# File 'lib/helpers/simple_http_helper.rb', line 22
def _request_prefix
raise NotImplementedError
end
|
#delete(*args, &block) ⇒ Object
71
72
73
|
# File 'lib/helpers/simple_http_helper.rb', line 71
def delete(*args, &block)
return _send_request(DeleteContent, *args, &block)
end
|
#get(*args, &block) ⇒ Object
63
64
65
|
# File 'lib/helpers/simple_http_helper.rb', line 63
def get(*args, &block)
return _send_request(GetContent, *args, &block)
end
|
#loginsight_get(*args, &block) ⇒ Object
75
76
77
|
# File 'lib/helpers/simple_http_helper.rb', line 75
def loginsight_get(*args, &block)
return _send_request(LoginsightGetContent, *args, &block)
end
|
#patch(*args, &block) ⇒ Object
67
68
69
|
# File 'lib/helpers/simple_http_helper.rb', line 67
def patch(*args, &block)
return _send_request(PatchContent, *args, &block)
end
|
#post(*args, &block) ⇒ Object
59
60
61
|
# File 'lib/helpers/simple_http_helper.rb', line 59
def post(*args, &block)
return _send_request(PostContent, *args, &block)
end
|
#set_auth(username, password) ⇒ Object
16
17
18
19
20
|
# File 'lib/helpers/simple_http_helper.rb', line 16
def set_auth(username, password)
@auth = OpenStruct.new
@auth.username = username
@auth.password = password
end
|