I will share the build to make a simple REST callout using Lightning Web Component Controller.
We will use a sample third-party domain to do the callout.
Configuration:-
You have to add a named credential in your salesforce org first.
![](https://salesforcehunt.online/wp-content/uploads/2022/01/image-1024x384.png)
Apex Class:-
DogApi.js
DogApi.html
DogApi.xml
Output
![](https://salesforcehunt.online/wp-content/uploads/2022/01/image-1-1024x412.png)
Checkout complete video tutorial below
0 Comments