import base64
import requests


def get_as_base64(url):
    """
    Encode the response of a url in base64
    
    Args:
        url (str): The API URL to fetch
    
    Returns: 
        the base64 string encoded
    """
    
    return base64.b64encode(requests.get(url).content)