is he has right to take all my salary and court can say to me to go back?or my refusal will give him right of divorce without any obligation towards me and child as I am earning.
It is not right on his part to take away all your salary in the name of he being your husband.
If you refuse to give him your entire salary, it cannot give him right to divorce to you.
If you are earning equal or more than him, then he will not have any obligation to paymaintenance to you. If you are earning less than him, then you can claim for your maintenance but how much you can get depends upon various factors.
Even though you are earning, he has got obligation to pay maintenance to your child. For that you have to file an interim application under Sectin 24 of the HMA in the same case where he filed RCR.
My other advice is:
Contest the Restitution of conjugal rights (RCR) case filed by your husband very sincerely. There are couple of points to remember in respect of RCR. By just filing of RCR by the husband, court will not give you direction to go and stay with him. You said in your post that you were subjected to cruelty by him and his family and they were consistently demanding dowry and also your entire salary. These are the valid grounds for a wife to stay away from husband and matrimonial home. If the wife shows reasonable grounds for staying away from the husband to the court to its satisfaction, courts will dismiss RCR petition. Then, you need not to go to matrimonial home against your wish.
Wish you best of luck.