import requests


def send_request(url, method='GET', params={}, data={}, files={}):
    """
    Send a request with given method and data
    """

    if method == 'GET':
        response = requests.get(url, params=params)
    else:
        response = requests.post(url, params=params, data=data, files=files)

    data = response.content.decode()
    if response.status_code == 200:
        return data
    else:
        print(f'*** {response.status_code} Error: {data}')

    return