Class: RemoteDatabaseCleaner::Http

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.post(config, params, rest_client = RestClient) ⇒ Object



5
6
7
# File 'lib/remote_database_cleaner/http.rb', line 5

def self.post(config, params, rest_client = RestClient)
  new.post(config, params, rest_client)
end

Instance Method Details

#post(config, params, rest_client) ⇒ Object



9
10
11
12
# File 'lib/remote_database_cleaner/http.rb', line 9

def post(config, params, rest_client)
  config.raise_if_host_not_set
  rest_client.post config.home_url, params, content_type: :json, accept: :json
end