JQuery

ajax

example:

$.ajax({
  url: "http://localhost:8080/api/v1/label",
  type: "GET",
  async: false,
  success: function (data) {
    console.log(data);
  },
  error: function (data) {
    console.log(data);
  },
});