wvg/python/schemes/Polsat.py
FoxRefire 5c56da872a Refactor: Use corsFetch for all schemes
Currently corsFetch is very stable and does not need to be used differently from pyfetch depending on whether the license server values the Origin header.
Nested await is no longer necessary and the code is more concise.
It is expected to be less confusing for debugging and for people creating new schemes.
2024-07-30 17:02:48 +09:00

7 lines
235 B
Python

payload = loadBody("json")
challengeB64 = base64.b64encode(challenge).decode()
payload['params']['object'] = challengeB64
res = await corsFetch(licUrl, "POST", licHeaders, payload, "json")
licence = res['result']['object']['license']