Skip to content

Commit

Permalink
fix connection test script to use httpx
Browse files Browse the repository at this point in the history
  • Loading branch information
sim0nx committed Sep 25, 2023
1 parent 9ec9c00 commit 16df761
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docker/test_connectivity.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
import json
import time

import requests
import httpx

base_url = 'http://localhost:8080/rest'

while True:
try:
req = requests.get(base_url + '/items')
req = httpx.get(base_url + '/items')
items = req.json()
except (requests.exceptions.RequestException, json.JSONDecodeError) as exc:
except (httpx.RequestError, json.JSONDecodeError) as exc:
print(str(exc))
else:
if req.status_code == 200:
Expand Down

0 comments on commit 16df761

Please sign in to comment.