Created
April 20, 2022 22:36
-
-
Save fdocr/5738ac8fa724befd63456b798037ef90 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/usr/bin/env ruby | |
require 'httparty' | |
url = '' | |
concurrency = 15 | |
threads = [] | |
concurrency.times do |i| | |
threads << Thread.new do | |
options = { | |
body: { | |
user: { # your resource | |
email: '', | |
password: '', | |
}, | |
commit: 'Sign in', | |
} | |
} | |
response = HTTParty.post(url, options) | |
p "Request #{i}: #{response.code}" | |
end | |
end | |
threads.each(&:join) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment