correction in rest client try open socket to avoid lengthy operation