Skip to content

Instantly share code, notes, and snippets.

@ryf123
Created April 29, 2019 20:51
Show Gist options
  • Save ryf123/e2301e74acbc1d9c456f9ed74f3c28af to your computer and use it in GitHub Desktop.
Save ryf123/e2301e74acbc1d9c456f9ed74f3c28af to your computer and use it in GitHub Desktop.
import requests
import threading
url = "http://localhost:17943/v1/feeds/profile"
querystring = {"maxresults":"2","nextpagetoken":"1"}
headers = {
'cache-control': "no-cache",
'postman-token': "32412874-eb43-37c4-fbd6-939d99a3881a"
}
def call(i):
response = requests.request("GET", url, headers=headers, params=querystring)
msg = "%i : %s" %(i, response.status_code)
print(msg)
for i in xrange(100):
t = threading.Thread(target=call, args=([i]))
t.start()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment