Class: CortexClient::Http::Request

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

Instance Method Summary collapse

Constructor Details

#initializeRequest

Returns a new instance of Request.



4
5
6
7
8
# File 'lib/cortex_client/http/request.rb', line 4

def initialize
  @config = CortexClient.configuration
  @host = @config.host
  @client = http
end

Instance Method Details

#post(path, body) ⇒ Object



10
11
12
13
14
# File 'lib/cortex_client/http/request.rb', line 10

def post(path, body)
  wrap_failure do
    Response.new(@client.post(uri(@host, path), :body => body))
  end
end