WIP
This commit is contained in:
parent
adb5fda917
commit
3e0415824d
|
|
@ -279,18 +279,8 @@ class ClientWrapper(object):
|
||||||
async def interr(request: web.Request):
|
async def interr(request: web.Request):
|
||||||
if request.can_read_body:
|
if request.can_read_body:
|
||||||
# Get the payload
|
# Get the payload
|
||||||
print("Got a normal request: {}".format(request))
|
post_params = await request.post()
|
||||||
print(await request.post())
|
payload = post_params["payload"]
|
||||||
content = await request.read()
|
|
||||||
print(content)
|
|
||||||
# Decode it
|
|
||||||
content = content.decode()
|
|
||||||
print(content)
|
|
||||||
# Unescape it
|
|
||||||
content = urllib.parse.unquote(content)
|
|
||||||
print(content)
|
|
||||||
body_dict = json.loads(content)
|
|
||||||
payload = body_dict["payload"]
|
|
||||||
print("Interaction received: {}".format(payload))
|
print("Interaction received: {}".format(payload))
|
||||||
|
|
||||||
# Handle each action separately
|
# Handle each action separately
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue