Created
June 24, 2015 07:19
-
-
Save zackexplosion/9e1189b4c0f875289568 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 "net/http" | |
require "uri" | |
require "random-word" | |
# enter your hook | |
hook = "" | |
uri = URI.parse(hook) | |
# Shortcut | |
10.times do |i| | |
word = RandomWord.adjs.next.capitalize + ' ' + RandomWord.adjs.next + ' ' + RandomWord.adjs.next + '.' | |
puts word | |
response = Net::HTTP.post_form(uri, {"payload" => '{"text": "' + word + '" }'}) | |
# puts response.to_s | |
sleep(5) | |
end | |
# Full control | |
# http = Net::HTTP.new(uri.host, uri.port) | |
# request = Net::HTTP::Post.new(uri.request_uri) | |
# request.set_form_data({"q" => "My query", "per_page" => "50"}) | |
# response = http.request(request) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment