function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
S R 30S R 30 

AJAX Call from Lightning Component

Hi, I'm trying to make AJAX call to the REST API Endpoint directly from Lightning Component.

I see following error: 
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at Endpoint. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).

Please help me to understand this error.

Rahul KumarRahul Kumar (Salesforce Developers) 
Hi,

 Ajax calls with Lightning Components May I request you please refer the below link for reference. Hope it helps.

Please mark it as best answer if the information is informative.so that question is removed from an unanswered question and appear as a proper solution.

Thanks
Rahul Kumar
ankur kumar 79ankur kumar 79
This is very simple mode game text twist msn (https://texttwist.online) such a good game.