Created
April 29, 2019 20:51
-
-
Save ryf123/e2301e74acbc1d9c456f9ed74f3c28af 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
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