HTTP post with json data using java
How to send json data to REST Api using java.
we need to open a url connection for that API with username and password that has been provided by them.
I have username , password connection type i.e basic authentication.
So anyone pl help me to create HTTP client to post the json data to particular API.
Re: HTTP post with json data using java
You can quite easily find out how to do this by making a few Internet searches. E.g.,
Search term: java http client json
Apache HttpClient and Jersey are but just 2 of the many ways this can be done.
Apache HttpClient is quite convenient because it can also handle basic authentication.
Search term: httpclient basic authentication