Class: Vermillion::Helper::Network

Inherits:
Object
  • Object
show all
Defined in:
lib/client/helper/network.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#configObject

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