updated because I changed sendRequest to send in the Rest Client