Package com.ibm.integration.admin.http

This is the HTTP Client which the Integration API uses and you can use directly.

See: Description

  • Class Summary 
    Class Description
    HttpClient
    A local HTTP client for connecting to local integration nodes and servers using local communications
    HttpResponse
    Parsed HttpResponse from LocalClient

Package com.ibm.integration.admin.http Description

This is the HTTP Client which the Integration API uses and you can use directly.

You can use this client to remotely or locally send REST requests to the Integration Node or Integration Server For example, in the following run this would connect to the given Integration Node and make a direct REST call.

        HttpClient httpClient = new HttpClient("MYNODE");
        try {
            HttpResponse httpResponse = httpClient.getMethod("/apiv2");

            int statusCode = httpResponse.getStatusCode();
            String body = httpResponse.getBody();
            String reason = httpResponse.getReason();

            System.out.println(statusCode + "\n" + reason + "\n" + body + "\n" );

        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }