-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathhttpreq1.py
More file actions
36 lines (31 loc) · 777 Bytes
/
httpreq1.py
File metadata and controls
36 lines (31 loc) · 777 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import httplib
import time
conn = httplib.HTTPConnection("127.0.0.1",8887)
conn.request("GET", "/")
r1 = conn.getresponse()
print r1.status, r1.reason
conn.close()
time.sleep(10)
conn = httplib.HTTPConnection("127.0.0.1",8887)
conn.request("GET", "/")
r2 = conn.getresponse()
print r2.status, r2.reason
conn.close()
time.sleep(10)
conn = httplib.HTTPConnection("127.0.0.1",8887)
conn.request("GET", "/")
r3 = conn.getresponse()
print r3.status, r3.reason
conn.close()
time.sleep(10)
conn = httplib.HTTPConnection("127.0.0.1",8887)
conn.request("GET", "/")
r4 = conn.getresponse()
print r4.status, r4.reason
conn.close()
time.sleep(10)
conn = httplib.HTTPConnection("127.0.0.1",8887)
conn.request("GET", "/")
r5 = conn.getresponse()
print r5.status, r5.reason
conn.close()