def METHOD_NAME(url: str, head_only: bool = False) -> QNetworkReply:
    m = QgsNetworkAccessManager.instance()
    req = QNetworkRequest(QUrl(url))
    if head_only:
        reply = m.head(req)
    else:
        reply = m.get(req)
    return reply