Class: CortexClient::Http::Request
- Inherits:
-
Object
- Object
- CortexClient::Http::Request
- Defined in:
- lib/cortex_client/http/request.rb
Instance Method Summary collapse
-
#initialize ⇒ Request
constructor
A new instance of Request.
- #post(path, body) ⇒ Object
Constructor Details
#initialize ⇒ Request
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 |