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 Balaji 8S Balaji 8 

LWC Api callout on click of a button

Can someone share me the sample code or provide me idea of how to make an api callout in LWC on click of a button.
 
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Balaji,

Can you check the example (https://roycon.com/how-to-make-rest-api-callouts-from-lightning-web-components/) of calling API from LWC button.

If this solution helps, Please mark it as best answer.

Thanks,