import base64
from typing import Dict


class KongRequest(object):
    def __init__(self,
                 event: Dict):
        self.path = str(event['request_uri']).split('?')[0]
        self.method = event['request_method']
        self.args = event['request_uri_args']
        self.headers = event['request_headers']
        self.data = base64.b64decode(event['request_body']).decode()
