def post_json(self, url, data, cls=None, **kwargs):
        """
        POST data to the api-server

        :param url: resource location (eg: "/type/uuid")
        :type url: str
        :param cls: JSONEncoder class
        :type cls: JSONEncoder
        """
        kwargs['data'] = to_json(data, cls=cls)
        kwargs['headers'] = self.default_headers
        return self.post(url, **kwargs).json()