Call External API from Lightning Web Component | Fetch API in JavaScript

Опубликовано: 14 Октябрь 2024
на канале: SFDC Stop
7,683
101

Hello Trailblazers, In this video we're going to learn how we can we call external API from a Lightning web component. We're going to use fetch() method to call GitHub API. We'll also learn about CSP trusted sites in Salesforce.

Chapters:
0:00 Introduction
0:33 Fetch API Explanation
7:03 LWC Component Explanation
12:01 Fetch Syntax
12:40 Fetch Documentation
12:59 Issue while using fetch in Salesforce
14:25 Setting up CSP Trusted Sites
15:59 Wrapping up and references

Code: https://github.com/rahulmalhotra/sale...

Fetch API Documentation: https://developer.mozilla.org/en-US/d...

Blog: https://www.sfdcstop.com/2021/08/call...

Subscribe to SFDC Stop:- https://www.youtube.com/c/sfdcstop?su...

LWC Todo App Project Tutorial Series -    • Simplifying the Callouts in Salesforc...  

Interested in learning about Scratch Orgs and SFDX ? Have a look at the playlist:-    • Getting started with Scratch Orgs and...  

Interested in learning about Integration ? Have a look at this playlist:-    • Salesforce Integration Tutorial Series