This commit is contained in:
2026-03-02 12:31:49 +00:00
parent 5975ea48f7
commit 94184aea03
+2 -2
View File
@@ -20,7 +20,7 @@ payload = {
def get_data():
data = json.dumps(payload).encode("utf-8")
req = urllib.request.Request(
req = request.Request(
url,
headers={"Content-Type": "application/json"},
data=data,
@@ -28,7 +28,7 @@ def get_data():
)
try:
with urllib.request.urlopen(req, timeout=10) as response:
with request.urlopen(req, timeout=10) as response:
data = response.read()
json_data = json.loads(data)
print(json_data)