CORS Error while calling external api using ajax

  ajax, api, cors, javascript

I’m developing an online code editor web application. I’m using Spring Boot for backend and for running my code snippets. For testing purpose I used ajax to do GET request to display the languages inside browser’s console. My html code is

    <button onclick="loadData();">click</button>
   const loadData =() =>
            url: "",
            method: "GET",
            success: function(res) {

While making ajax request I got error like this!
enter image description here
I can’t do any server side modifications since I’m using External API. Can anyone help me to resolve this error?

Source: Ask Javascript Questions