Skip to content

Instantly share code, notes, and snippets.

@fdocr
Created April 20, 2022 22:36
Show Gist options
  • Save fdocr/5738ac8fa724befd63456b798037ef90 to your computer and use it in GitHub Desktop.
Save fdocr/5738ac8fa724befd63456b798037ef90 to your computer and use it in GitHub Desktop.
#!/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