Class: Vermillion::Helper::Network
- Inherits:
-
Object
- Object
- Vermillion::Helper::Network
- Defined in:
- lib/client/helper/network.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
Access the configuration object instance externally.
Instance Method Summary collapse
-
#get(url, key) ⇒ Object
- Perform a GET request to a specified URL Params:
url - The URL you want to hit
key -
The authentication key to pass via headers to the URL.
- The URL you want to hit
- Perform a GET request to a specified URL Params:
-
#post(url, key) ⇒ Object
- Perform a POST request to a specified URL Params:
url - The URL you want to hit
key -
The authentication key to pass via headers to the URL.
- The URL you want to hit
- Perform a POST request to a specified URL Params:
Instance Attribute Details
#config ⇒ Object
Access the configuration object instance externally
5 6 7 |
# File 'lib/client/helper/network.rb', line 5 def config @config end |
Instance Method Details
#get(url, key) ⇒ Object
Perform a GET request to a specified URL Params:
url-
The URL you want to hit
key-
The authentication key to pass via headers to the URL
11 12 13 |
# File 'lib/client/helper/network.rb', line 11 def get(url, key) _request(url, :GET, key) end |
#post(url, key) ⇒ Object
Perform a POST request to a specified URL Params:
url-
The URL you want to hit
key-
The authentication key to pass via headers to the URL
19 20 21 |
# File 'lib/client/helper/network.rb', line 19 def post(url, key) _request(url, :POST, key) end |