I am trying to run a REST Post for the first time, and I don’t quite know where to start.
I am interacting with the WordPress REST API and I am trying to use this endpoint: /sites/$site/posts/$post_ID/replies/newwhich is used to send a new comment to a specific post.
I think that I am well versed in working with GET requests since I have successfully dealt with several of them. With that, I could say everything I needed to tell the server regarding the URL, but there seems to be one more step with POST requests. And my question is: what are these steps?
Do I complete the content that I want to send to JSONObject and publish it? If so, how do I place it? Do I need to somehow create a statement, similar to how I will build a statement to execute in a database? Or is it really possible to pass my content through a URL as request parameters?
I know that this question is a bit on the side open to SO, but I could not find a good tutorial that answers these questions. If you know one, suggest it.
(I do it all in an Android app)
source
share