Send a message to a Slack room through a webhook
    :param webhook:     The url of the incoming webhook
    :param author_icon: The thumbnail image to be displayed on the right side of the message
    :param title:       The title of the message
    :param report:      The report of the function state
    :return:            Boolean if message was sent successfully

def _post_message(webhook, author_icon, title, report):
    '''
    Send a message to a Slack room through a webhook
    :param webhook:     The url of the incoming webhook
    :param author_icon: The thumbnail image to be displayed on the right side of the message
    :param title:       The title of the message
    :param report:      The report of the function state
    :return:            Boolean if message was sent successfully
    '''

    payload = _generate_payload(author_icon, title, report)

    data = _urlencode({
        'payload': json.dumps(payload, ensure_ascii=False)
    })

    webhook_url = 'https://hooks.slack.com/services/{webhook}'.format(webhook=webhook)
    query_result = salt.utils.http.query(webhook_url, 'POST', data=data)

    if query_result['body'] == 'ok' or query_result['status'] <= 201:
        return True
    else:
        log.error('Slack incoming webhook message post result: %s', query_result)
        return {
            'res': False,
            'message': query_result.get('body', query_result['status'])
        }