def post(self, request, data=None):
        """
        Used to make post calls to mattermost api
        :param request:
        :param data:
        :return:
        """
        headers = {"Authorization": "Bearer " + self.token }
        logging.debug(json.dumps(data, indent=4))
        p = requests.post(self.url + request, headers=headers, data=json.dumps(data))
        return json.loads(p.text)
def post ( self , request , data = None ) : headers = { "Authorization" : "Bearer " + self . token } logging . debug ( json . dumps ( data , indent = 4 ) ) p = requests . post ( self . url + request , headers = headers , data = json . dumps ( data ) ) return json . loads ( p . text )
Used to make post calls to mattermost api
        :param request:
        :param data:
        :return: