optimized getRequest. Added timeout (not fully functional yet)