fix: pass Proxmox delete params in query
This commit is contained in:
@@ -198,7 +198,11 @@ jobs:
|
|||||||
body = None
|
body = None
|
||||||
req_headers = dict(headers)
|
req_headers = dict(headers)
|
||||||
if data is not None:
|
if data is not None:
|
||||||
body = urllib.parse.urlencode(data).encode()
|
encoded = urllib.parse.urlencode(data)
|
||||||
|
if method == "DELETE":
|
||||||
|
path = f"{path}?{encoded}"
|
||||||
|
else:
|
||||||
|
body = encoded.encode()
|
||||||
req_headers["Content-Type"] = "application/x-www-form-urlencoded"
|
req_headers["Content-Type"] = "application/x-www-form-urlencoded"
|
||||||
req = urllib.request.Request(
|
req = urllib.request.Request(
|
||||||
f"{endpoint}/api2/json{path}",
|
f"{endpoint}/api2/json{path}",
|
||||||
|
|||||||
Reference in New Issue
Block a user