moved logic from MyHTTPRequest to MyClientThread