def call_endpoint(endpoint, deployment):
    global LOG
    try:
        headers = get_headers()
        if headers:
            response = requests.post(endpoint, data=deployment, headers=headers)
            LOG.debug('Calling "%s", response was "%s"', endpoint, response.text)
        else:
            LOG.info('Skipped calling flottsbro-api, header constraints not satisfied.')
    except (HTTPError, ConnectTimeout, RequestException) as request_ex:
        LOG.error('Could not add deployment to Flottsbro-API: "%s"', request_ex)
def call_endpoint(endpoint, deployment):
    global LOG
    try:
        headers = get_headers()
        if headers:
            response = requests.post(endpoint, data=deployment, headers=headers)
            LOG.debug('Calling "%s", response was "%s"', endpoint, response.text)
        else:
            LOG.info('Skipped calling flottsbro-api, header constraints not satisfied.')
    except (HTTPError, ConnectTimeout, RequestException) as request_ex:
        LOG.error('Could not add deployment to Flottsbro-API: "%s"', request_ex)