Add sendData and sendRequest functions