update api.sendRequest