import requests


def ISIC_request(response, num=100):
    """Fetching the metadata from images in ISIC archive by sending a HTTP
    request to the ISIC's REST API.
    Parameters:
        num(int): Number of the images you get from the archive,default is 100
    Returns:
        Json: Response metadata in JSON format
    """
    start_url = f'https://isic-archive.com/api/v1/image?limit={num} \
                  &sort=name&sortdir=1&detail=true'
    headers = {'Accept': 'application/json'}
    r = requests.get(start_url, headers=headers)
    data = r.json()
    return data