Created May 9, 2022
The Java client-side library is used to provide the set of Java objects that can be serialized to/from JSON using Jackson. This is useful for accessing the JSON REST endpoints that are published by this application.
java.net.URL url = new java.net.URL(baseURL + "/2/messages/write-message");
ObjectMapper mapper = new ObjectMapper();
java.net.URLConnection connection = url.openConnection();
connection.setDoOutput(true);
connection.connect();
mapper.writeValue(connection.getOutputStream(), messageInputBean);
Object result = (Object) mapper.readValue( connection.getInputStream(), Object.class );
//handle the result as needed...
javax.ws.rs.client.Client client = javax.ws.rs.client.ClientBuilder.newClient();
Object result = client.target(baseUrl + "/2/messages/write-message")
.post(javax.ws.rs.client.Entity.entity(messageInputBean, "application/json"), Object.class);
//handle the result as needed...
| name | size | description |
|---|---|---|
| social-service-client.jar | 52.89K | The binaries for the Java JSON client library. |