add restclient mode