import requests


def fetch(url: str) -> bytes:
    """
    Request a page URL and get the response content in bytes.

    The stream param is not strictly needed to handle a PDF as it works without
    it, but it was recommended in a thread. The param sets a header so that
    response comes in chunks.

    :raises: HTTPError for 4xx or 5xx response.
    """
    resp = requests.get(url, stream=True)

    resp.raise_for_status()

    return resp.content