def request(self, data, request_type: RequestTypes):
        """ internal request method 
        
        :param session: session object from the Requests package
        :param data: internal data of your API call
        :param request: the type of request, based on the RequestType enum
        :returns: dict with sessionid for a login and the dict of the things for the other calls, or just success for PUT
        :raises: raises errors from Requests through the raise_for_status function
        """
        #prepare the URL to send the request to
        url = data['host'] + data['path']

        #fixed header content
        headers = self._DEFAULT_HEADER
        if self._sessionid:
            headers['Cookie'] = "skySSEIONID=" + self._sessionid

        #prepare the payload and add the length to the header, payload might be empty.
        if "data" in data:
            payload = json.dumps(data['data'])
            headers["Content-Length"] = str(len(data['data']))
        else: payload = ""
        
        #send the request and capture the response
        resp = requests.request(request_type.value, url, data=payload, headers=headers)
        # raise an error if it occured in the Request.
        resp.raise_for_status()
        # no error, so set result to success
        ret = {'result': 'success'}
        # check if there is something in the response body
        if len(resp.text) > 0:
            respjson = resp.json()
            # if it is a list of things, then set the tag to things
            if type(respjson) is list:
                ret['things'] = respjson
            # otherwise to a single thing. If ID is part of it it is a login response, otherwise a Thing
            elif "ID" in respjson:
                ret['login'] = respjson
                # if it was a login a new cookie was send back, capture the sessionid from it
                self._sessionid = resp.cookies['skySSEIONID']
                ret['cookie'] = resp.cookies
            else:            
                ret['thing'] = respjson
        return ret