Skip to content

Instantly share code, notes, and snippets.

@asterite
Last active August 29, 2015 14:16
Show Gist options
  • Save asterite/0cbdb17ccf9eb91414af to your computer and use it in GitHub Desktop.
Save asterite/0cbdb17ccf9eb91414af to your computer and use it in GitHub Desktop.
require "http/client"
client = HTTP::Client.new "slack.com"
i = 0
loop do
response = client.get "/api/users.list"
pp response.body
pp i
i += 1
sleep 30
end
require "socket"
socket = TCPSocket.new "slack.com", 80
loop do
socket.print "GET /api/users.list HTTP/1.1\r\n\r\n"
p socket.read
sleep 30
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment