Developing a RESTful web service client
Although curl allows us to quickly test our RESTful web services and is a developer-friendly tool, we need a way for our Java applications to invoke the RESTful web services we develop. Jakarta REST includes a client-side API we can use to develop RESTful web service clients.
The following example illustrates how to use the Jakarta REST client API:
package com.ensode.jakartaeebook.jakartarestintroclient;
//imports omitted for brevity
public class App {
public static void main(String[] args) {
App app = new App();
app.insertCustomer();
}
public void insertCustomer() {
String customerJson = """
{
...