Advertisement
Guest User

Untitled

a guest
Nov 18th, 2016
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. begin
  2. uri = URI('http://localhost:5000/api/game/' + $game_id + '/board/' + $board_id + '/hit')
  3. req = Net::HTTP::Post.new(uri, 'Content-Type' => 'application/json')
  4. req.body = {:x => x_pos, :y => y_pos}.to_json
  5.  
  6. rescue Exception => er
  7. error("failed #{er}")
  8. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement