POST Form Data With JavaScript Fetch API

preview_player
Показать описание
Hi, I'm Wesley. I'm a brand ambassador for Kinde (paid sponsorship). I'll help you master the latest tech here:

👉 Discord: all my courses have a private Discord where I actively participate

⏱️ Timestamps:
0:00 - Intro
0:37 - Collect form data with FormData
3:46 - Fetch API to POST data
5:51 - Turn form data into x-www-form-urlencoded format with URLSearchParams
7:08 - Updating fetch call
8:21 - Submit data

#fetchapi #fetch #javascriptform #javascript .
.
Рекомендации по теме
Комментарии
Автор

I´m loving these videos, short and straight to the point. Thank you!!

Shiroiookami
Автор

This is great - I didn't realize that you could initialize the FormData() object using the form node. Outstanding!

bennadel
Автор

very nice. I had not seen anything on this technique for creating the query string. Thank you.

victor_yahoo
Автор

This was a amazing tutorial!! I have been stuck on this for days! thank you for making it so easy to understand and simple! great content, definitely going to subscribe for more! :)

NathanSantos-seds
Автор

Is there a way to for example, GET info from a website, take the data, and then POST it to another?

candycool_vr
Автор

ok, this worked for me, now how can i handle this fetch post request from the backend? i have node js and express installed in my project, how can i receive these data and then send them somewhere else or console.log them?

yazan
Автор

Thank you. But I have a question: How about the validation before you send data to the server?

Racine
Автор

FormData() never knew that existed? How many built-in objects are provided in JavaScript, that is a lot i never knew. Can you list all of them

otsutsukimomoshiki
Автор

can I use this approach for calling a SOAP service using javascript?

JunicaviGames
Автор

Nice tutorial well explained keep it up

MTH_MUST_OBEY
Автор

How do i redirect users to another page on successful form submission ?

realagara