How to Write a Code to Push a Post and its Associated Comments to a Target Wordpress Site Using the Wordpress REST API?

It supports the authentication already, instead of using props.