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']
        if 'request_body' in event:
            self.data = event['request_body'].encode("utf-8")
        else:
            self.data = ""
