POST Form Data as JSON with Fetch API in JavaScript

  Рет қаралды 68,545

ByteGrad

ByteGrad

Күн бұрын

Пікірлер: 51
@wickedclamor4882
@wickedclamor4882 2 жыл бұрын
First time on your channel but I liked it from the start. Great quality, nice audio, clear voice and content is exactly what the title says. Thank you.
@ByteGrad
@ByteGrad 2 жыл бұрын
Hi, mastering JavaScript is critical if you want to be a modern, professional developer: www.udemy.com/course/professional-javascript-course/?referralCode=0C1D5752923168BC87C2 Also, if you are a front-end developer then mastering CSS (including Flexbox, CSS Grid, etc.) is equally important: www.udemy.com/course/professional-css/?referralCode=4C3C08E82629E6B15752
@HarisSohail-q4q
@HarisSohail-q4q Жыл бұрын
Man. I am seeing you the first time, and I think you have brilliantly explained the concept. Awesome 💯
@kavindudilshan8818
@kavindudilshan8818 Жыл бұрын
this is the best video i have fond in youtbe for JSON with Fetch API in JavaScript it is very good
@mauricioknabben2793
@mauricioknabben2793 2 жыл бұрын
Thank you for all! Greetings from Brasil, this video helped me a lot with a college project
@seekknowledge1928
@seekknowledge1928 3 ай бұрын
Sir you explain very well. I am amazed. ❤
@Farid9086
@Farid9086 3 ай бұрын
Thank you so much my brother ❤
@socialpeople6615
@socialpeople6615 Жыл бұрын
Thank you!!! You helped me figure out the FormData.
@marynakryvoruchenko1393
@marynakryvoruchenko1393 Жыл бұрын
Thanks for the video! Is there a json file that the information gets stored to so I could display it in another file?
@iv4nschneider
@iv4nschneider Жыл бұрын
Amazing explanation !!! Thank you.
@majorcodegeek
@majorcodegeek Жыл бұрын
Your video worked and so simple. Thank you so much
@gunnarvispoel
@gunnarvispoel Жыл бұрын
Awesome video, very clear.
@mikempaka6269
@mikempaka6269 Жыл бұрын
Hi ByteGrad, I'm trying to Post from my Api I created in locahost and I have an '''error of SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data". Can it be possible to Post also in API in localhost?
@metifu
@metifu Жыл бұрын
what about only specific form elements only like "user name" "terms of condition" for the Object?
@032_jatingaur7
@032_jatingaur7 2 жыл бұрын
awesome bro💯
@ajaygulani3086
@ajaygulani3086 2 жыл бұрын
Thank you! this is exactly what I was looking for!
@igorvenancio5899
@igorvenancio5899 2 жыл бұрын
You're a really good teacher. Thanks
@troymelok831
@troymelok831 Жыл бұрын
Hi, thanks for sharing. I don´t understand why is needed to convert to json if we can send FormData directly and then in the php file get data with POST if we use this method to send of course
@edwintjoa6099
@edwintjoa6099 2 жыл бұрын
Thanks for your video, you made it so easy to understand and implement.
@ibrohimahmadjonov6859
@ibrohimahmadjonov6859 7 ай бұрын
How the page is not reloading after POST method, i cannot do that, please help
@selsabildjazouli7486
@selsabildjazouli7486 Жыл бұрын
that was soo helpful, thank you
@sinki3322
@sinki3322 Жыл бұрын
When I try to console log my elements, it says « null » and when I try to send them to the api it says « failed to load resource: server responded with 401 ». Do you have ideas on how I could fix it ? Thank you for your video
@narendrapatil8407
@narendrapatil8407 Жыл бұрын
Thank you it helped me in my project
@koenstuurman153
@koenstuurman153 2 жыл бұрын
Hi, Thanks for the amazing tutorial. I have 1 issue, I did the exact same thing, but I get the "form.html:82 Uncaught TypeError: Cannot read properties of null (reading 'addEventListener')" error. What could be the issue here?
@ByteGrad
@ByteGrad 2 жыл бұрын
Hi, probably you didn’t select the HTML-element properly with querySelector
@koenstuurman153
@koenstuurman153 2 жыл бұрын
@@ByteGrad you're right I used id instead of class hehe. Thanks!
@hayf0_bs
@hayf0_bs 10 ай бұрын
hi! theme name?
@Hrit
@Hrit 2 жыл бұрын
Thanks for such a clear explanation!
@yeonjoon6637
@yeonjoon6637 Жыл бұрын
Hiii the url u r giving how do I identify how can provide that url!?? Which url nd how can provide it crtly!?
@sachinvarma9949
@sachinvarma9949 Жыл бұрын
Thank you so much brotherrr
@derrickk2916
@derrickk2916 Жыл бұрын
Very helpful!
@JoaqoCR7
@JoaqoCR7 Жыл бұрын
Nice video bro!
@muhamadrifqi2612
@muhamadrifqi2612 Жыл бұрын
Hi, Thank you so much for the amazing tutorial. I have 1 issue, I did the exact same thing, but I get the "crbug/1173575, non-JS module files deprecated." then the page is not working. What could be the issue here?
@MarcelReig
@MarcelReig 2 жыл бұрын
Thanks, good video!
@StephaniePena-wq3pe
@StephaniePena-wq3pe Жыл бұрын
Does this code works if I want to make a form that has to use json information ?
@valdompinga
@valdompinga 2 жыл бұрын
What if the data to submit is an array of json's? when i send to the backend it gets there on a whole differente format and messes up everything, thank you!
@ByteGrad
@ByteGrad 2 жыл бұрын
Hi, I don’t know what an array of json’s. You have a code example?
@valdompinga
@valdompinga 2 жыл бұрын
@@ByteGrad Hello thanks for answering, my issue is that im trying to post data to a server that expects a JSON array, an exemple of it is: [{name : "Joe"},{name : "Bill"} ], i tested the endpoint using Insomnia REST, posting an hardcoded JSON array and it works fine, but on the frontend code, the js object is stored in variable because i had to do data pre propressing, so when i posted the data, i did: JSON.stringify(varWithPreprocessedJsObject). What the server recieved it would be equivalent to {[{"name" : "Joe"},{"name" : "Bill"} ]" : ''} So my question is, do identify something i did wrong? Sorry for the long text... thank you!
@ByteGrad
@ByteGrad 2 жыл бұрын
When you do JSON.stringify() you make it JSON format. Maybe it was already JSON format when you do JSON.stringify()? You would be doubling it
@valdompinga
@valdompinga 2 жыл бұрын
@@ByteGrad BRO, THAT WAS IT! Thank you so much man! Can i follow u on linkedin?
@ByteGrad
@ByteGrad 2 жыл бұрын
Nice. It’s a common mistake. Sorry don’t have LinkedIn
@MohammadhasanAbbasi
@MohammadhasanAbbasi Жыл бұрын
thank you very much for this video
@sharathkk1807
@sharathkk1807 Жыл бұрын
thank you so much sir .
@sumith
@sumith 2 жыл бұрын
very usful
@Epic_StoriesByPrit
@Epic_StoriesByPrit Жыл бұрын
can u make vedios on lua luci cause there is very rare material available one internet
@aromalunnikrishnan161
@aromalunnikrishnan161 Жыл бұрын
Thank you sir
@Onesmo
@Onesmo 10 ай бұрын
thank you so much
@jayroo10
@jayroo10 Жыл бұрын
Hi, are you on UpWork by any chance? as i am trying to fix a piece of code, that needs a "save post" button on the front end, to save response text into a post, it supposed to be straight forward, but I am having trouble with the authenticity token I think, which wont allow the submission to go through. Is there any way to get your help? do you do that kind of thing? thank you
@ByteGrad
@ByteGrad Жыл бұрын
Hi, sorry am completely swamped with work atm
@jayroo10
@jayroo10 Жыл бұрын
@@ByteGrad No worries, and thanks for your reply.
Read JSON File into HTML with JavaScript Fetch API
6:27
ByteGrad
Рет қаралды 50 М.
1.1: fetch() - Working With Data & APIs in JavaScript
15:39
The Coding Train
Рет қаралды 456 М.
The Best Band 😅 #toshleh #viralshort
00:11
Toshleh
Рет қаралды 22 МЛН
REAL or FAKE? #beatbox #tiktok
01:03
BeatboxJCOP
Рет қаралды 18 МЛН
Learn JSON in 10 Minutes
12:00
Web Dev Simplified
Рет қаралды 3,3 МЛН
POST Form Data With JavaScript Fetch API
9:52
ByteGrad
Рет қаралды 29 М.
React 19 STABLE - I Can't Believe They Changed This
11:18
ByteGrad
Рет қаралды 34 М.
POST form data using JavaScript's Fetch API
8:01
OpenJavaScript
Рет қаралды 44 М.
What is mathematical thinking actually like?
9:44
Benjamin Keep, PhD, JD
Рет қаралды 19 М.
How to FETCH data from an API using JavaScript ↩️
14:17
Bro Code
Рет қаралды 171 М.
1.4: JSON - Working with Data and APIs in JavaScript
16:22
The Coding Train
Рет қаралды 647 М.
All 17 React Best Practices (IMPORTANT!)
1:46:11
ByteGrad
Рет қаралды 216 М.
The Dome Paradox: A Loophole in Newton's Laws
22:59
Up and Atom
Рет қаралды 1 МЛН
для всей семьи
0:56
Стакановец
Рет қаралды 191 М.
НИКОГДА не иди на сделку с сестрой!
0:11
Даша Боровик
Рет қаралды 729 М.
пранк🤣😂😂
0:51
Numdexx1
Рет қаралды 1,2 МЛН
Что такое дагестанский кирпичный завод!
0:53
АВТОБРОДЯГИ - ПУТЕШЕСТВИЯ НА МАШИНЕ
Рет қаралды 746 М.