add setUrl variable in sendReq function