import requests


def post(url, data=None, raw_response_content=False):
    """
    POST API endpoint
    :param url: URL
    :param data: multipart/form-data parameters
    :param raw_response_content: return raw response content instead of parsing as JSON to dict
    :return: dic object or content of response in bytes
    """
    response = requests.post(url, files=data)
    response.raise_for_status()
    return response.content if raw_response_content else response.json()