So i need to send a json string in the request body for a POST request, all the searches on the web pointed me to really outdated examples with deprecated API.
I'd really appreciate if someone could point me to a more recent resource or better yet, provide an example themselves. I am using the Apache HttpClient btw. Also, i'm not sure how to set the content-type for the POST request.
P.S. If there is a way to do this without using the Apache HttpClient and instead use some native Java class, that'd be great too.