import requests


def process_image(ID, filename, method):
    """
    POST request the user to process the image

    Args:
        ID (str): user name
        filename (str): filename that should exist in database
        method (str): processing method

    Returns:
        r6.json() (str): Confirmation that image was processed or error message
    """
    pjson = {
        "username": ID,
        "filename": filename,
        "process": method
    }
    r6 = requests.post("http://vcm-9030.vm.duke.edu:5000/api/process_image",
                       json=pjson)
    print(r6.json)
    return r6.json()