import requests


def post(endpoint, payload, uri="http://127.0.0.1:5000/api/"):
    """
    Posts to the flask web server.
    Args:
        endpoint: The endpoint of the API
        payload: Payload according to what the web server requires.
        uri: Web server uri.

    Returns:
        object: Response from web server.

    """
    return requests.post(uri + endpoint, json=payload)