HTTP Centric API - 7.3

Talend ESB Service Developer Guide

Version
7.3
Language
English
Product
Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for ESB
Talend Real-Time Big Data Platform
Module
Talend ESB
Talend Runtime
Content
Design and Development
Installation and Upgrade
Last publication date
2023-04-17

This API lets developers write the HTTP centric code. This fluent API makes it easy to modify the request URI, check the response status and headers. For example:

public class RESTClient {

   public void consumeRESTfulService(String baseAddress) {
      WebClient client = WebClient.create(baseAddress);
      client.type("application/xml").accept("application/xml");
      client.path("/book1");
      // get javax.ws.rs.core.Response directly and check the status, 
      // headers and read the Response.getEntity() input stream
      Response response = client.get();
      // back to the base address
      client.back(true);
      client.path("/book2");
        
      // get a typed response
      Book response = client.get(Book.class); 
   }

}