def METHOD_NAME(ip: str, port: str, uri: str) -> bool:
    # Establish HTTP connection
    sess = http.client.HTTPConnection(ip + ':' + port, timeout=15)
    # GET response
    sess.request('GET', url=uri)
    resp = sess.getresponse()
    resp_data = resp.read().decode()
    search_str = 'Redirect to the captive portal'
    if search_str not in resp_data:
        raise RuntimeError('Failed to match {} with data from captive portal: {}'.format(search_str, resp_data))
    # Close HTTP connection
    sess.close()
    return True