Last active
August 29, 2015 14:16
-
-
Save asterite/0cbdb17ccf9eb91414af to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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