Posts

Showing posts with the label REST

OJET: Calling a REST Service

During my journey from a pure Java EE / Jakarta EE developer using JAX-RS, JSON-B, Jersey etc...  for Java - REST integration to JavaScript (in this case Oracle JET) I was checking the alternatives of calling REST services from JavaScript. Things has changed a lot since I was doing mostly Vanilla and JQuery JavaScript for some "quick fixes". Here I bring examples of making a GET request to a REST Service. The rest of operations only needs little bit more configuration, but this post is just to have a look into history in JavaScript and ways of calling a REST service (only making a GET, not a POST, PUT or DELETE) If you want to execute the code: https://github.com/DanielMerchan/ojet-examples It is fundamental that you read about JavaScript Promise Object and have a fully understand on it. Vanilla JavaScript < ES6+ Yes, during my career I had to deal with JavaScript in its early stages to make AJAX calls and requests. Basically this makes use of XMLHttpRequest ...