-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.py
More file actions
27 lines (26 loc) · 729 Bytes
/
test.py
File metadata and controls
27 lines (26 loc) · 729 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
from requests import Session
with Session as sess:
for i in range(1000):
data = {
"id": i,
"store": "Brussels",
"date": "2020-01-01",
"products": [
{
"id": "123456789",
"name": "Banana",
"price": 1.5
},
{
"id": "123456789",
"name": "Bread",
"price": 1.5
},
{
"id": "123456789",
"name": "Water",
"price": 1.5
}
]
}
sess.post("http://localhost:8000/data", json=data)