win32inet.InternetGetLastResponseInfo

int, string = InternetGetLastResponseInfo()

Retrieves the last Win32® Internet function error description or server response on the thread calling this function.