Class: Launchrock::Connection
- Inherits:
-
Object
- Object
- Launchrock::Connection
- Includes:
- HTTParty
- Defined in:
- lib/launchrock/connection.rb
Defined Under Namespace
Classes: ApiError
Class Method Summary collapse
Class Method Details
.perform_post(uri, body) ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/launchrock/connection.rb', line 6 def self.perform_post(uri, body) resp = HTTParty.post("#{base_uri}#{uri}", { :body => body }).first['response'] unless resp['status'] == 'OK' raise ApiError, "API Call Failed" end resp end |