Hi,
Meanwhile look at document How To Batch Multiple Operations Into A Single Request where it is explained on how to pass csrf header etc...Not sure if you are following same approach but still refer it and see if it resolve your issue.
Regards,
Chandra