Fix RunPod API client requests

This commit is contained in:
Daniel Maddern 2026-08-22 14:13:15 +07:00
parent bd92baeb46
commit 49a9d0d1a1

View file

@ -27,6 +27,7 @@ def request(method: str, path: str, body=None, query=None):
url += "?" + urllib.parse.urlencode(query)
data = None if body is None else json.dumps(body).encode("utf-8")
call = urllib.request.Request(url, data=data, method=method)
call.add_header("User-Agent", "h3-blackwell-runtime/0.1")
call.add_header("Authorization", f"Bearer {key}")
call.add_header("Accept", "application/json")
if data is not None: