Simple class to include REST API while prototyping

Published on

in

Reading time:

1–2 minutes

Dear community, I think it’s good when you prove the feasibility of a development based on a prototype. That gives a feeling of security because it shows that an idea can become something real.

Since we connect many systems with each other via interfaces these days and REST is often used for this, I developed a small class on SAP BTP for quickly integrating a REST API during the construction of a prototype.

The class lacks pretty much everything that CleanABAP recommends: hardly any exceptions, public attributes where private attributes would be appropriate, no interfaces and much more. But it can be quickly integrated into a larger code that serves as a prototype and adapted to the respective requirements. Since it is executable and outputs the HTTP request as well as the HTTP response on the Eclipse console, it can also be used to perform manual individual tests of the respective REST API.

When it comes to writing the productive code later, you should follow my recommendations for designing an interface.

Have fun prototyping

Michael