REST Client Classes

JADE provides JADE REST client classes, providing easy consumption of REST services The interface is similar to REST clients in other technologies; for example, the .NET RestSharp library (http://restsharp.org/).

This enables you to set properties on a JadeRestRequest object to specify the required resource and any required inputs such as parameters or a serialized object in the HTTP body (used for PUT or POST operations), then pass the object as a parameter to a method of the JadeRestClient class, which will return a JadeRestResponse object with properties for the various response information, along with deserialization methods.

The REST client proxy classes support the GET, PUT, POST, DELETE, and OPTIONS verbs, although other verbs are available when using the JadeRestClient class directly.

The REST client and proxy classes are summarized in the following table. (For details, see Volume 1 of the JADE Encyclopaedia of Classes.)

Class Description
JadeRestClient Represents the client that sends the REST request to the server
JadeRestProxy Grouping class for auto‑generated proxy classes that model a REST API based on an OpenAPI specification
       JadeRestDataModelProxy JadeRestProxy subclass grouping auto‑generated proxy classes that model the data structure of an imported REST API
       JadeRestResourceProxy JadeRestProxy subclass grouping proxy classes that expose the resource methods of the imported REST API
JadeRestProxyHook Provides hook methods that can be reimplemented in your client, request, and response REST subclasses
JadeRestRequest Represents a REST request that is to be sent to a REST API specification
JadeRestResponse Contains the results of a request to a REST API endpoint

JADE also provides a proxy class generator, which consumes an OpenAPI specification of a REST API and generates the appropriate data model and resource proxy classes. Use the JADE development environment External Components Libraries Browser to import and maintain OpenAPI specifications. For details, see "Maintaining OpenAPI Objects", in Chapter 16 of the JADE Development Environment User's Guide.

2020.0.01 and higher