82.6 F
Thursday, June 8, 2023

HTTP Requests from LWC with the Fetch API | Developer Quick Takes


Learn how to perform HTTP requests using the JavaScript standard Fetch API from a Lightning Web Component (or any other JS file).

* https://trailhead.salesforce.com/content/learn/trails/learn-to-work-with-javascript
* https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API
* https://app.lwc.studio/view/9UvzKbkZrxQ4RYRrWJf4
* https://www.youtube.com/watch?v=nf7eqg9WWPg

00:04 Introduction
00:15 What is the Fetch API?
00:29 What are we building?
00:58 Remote site settings
01:07 Content Security Policy Trusted Sited
01:21 LWC Application demo
2:00 Making a GET request using Promises
3:39 Convert image Blob to Base64 image
4:19 Making a POST request using async/await
5:27 Resources
5:52 Thanks for watching

Connect with Salesforce Developers:

Join the Community: www.salesforce.com/devcommunity
Website: https://developer.salesforce.com/
LinkedIn: https://linkedin.com/showcase/salesforce-developers
Twitter: https://twitter.com/salesforcedevs
Facebook: https://facebook.com/salesforcedevs/

Share post:

crm erp
crm erp


More like this

DevOps Essentials: Adopting Source Control

In this second episode of the DevOps Essentials, we...

Discussing FileMaker Hosting & Soliant.cloud with Thought Leaders

https://www.youtube.com/watch?v=IEVz-UA-RuA Bill Heizer and Adam Russ with Soliant Consulting sit...

FileMaker Data Exports with RESTful APIs & JSON Data Contracts

In today’s rapidly evolving digital landscape, businesses rely heavily...