Class: Pytty::Client::Cli::KillCommand
- Inherits:
-
Clamp::Command
- Object
- Clamp::Command
- Pytty::Client::Cli::KillCommand
- Defined in:
- lib/pytty/client/cli/kill_command.rb
Instance Method Summary collapse
Instance Method Details
#execute ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/pytty/client/cli/kill_command.rb', line 13 def execute Async.run do internet = Async::HTTP::Internet.new headers = [['accept', 'application/json']] body = {}.to_json for id in id_list do response = internet.post("http://localhost:1234/v1/kill/#{id}", headers, [body]) puts response.read end ensure internet.close end end |