Это видео недоступно.
Сожалеем об этом.
🔴 #3: How To Send HTML & JSON Data as a Response using Express JS in Hindi
HTML-код
- Опубликовано: 1 окт 2020
- Welcome, How to serve HTML and JSON data using Express JS in Hindi?
You can send the JSON response by using res.json() method. It accepts an object and converts it into JSON before sending it as a response.
😍 Check my Instagram to Chat with me: / vinodthapa55
✅ NodeJS Tutorial in Hindi 2020: • NodeJS Tutorial in Hin...
✅ Express JS Tutorial In Hindi in 2020: • Express JS Tutorial In...
************ Must Watch Videos For Web Development ************
➡️ ReactJS Tutorial in Hindi 2020 Playlist Link: • React JS Tutorial in H...
➡️ React JS Project Netflix App Part #1 in Hindi in 2020: • #22: Props in React Js...
➡️ Install VS Code for ReactJS LINK: www.thapatechn...
😍😍 Check Programming Videos in One Hour👇
➡️ Complete Reactjs in One video here • ReactJS For Beginners ...
➡️ HTML in One Video: • Learn HTML in One Vide...
➡️ CSS in One video: • Learn Complete CSS In ...
➡️ CSS FlexBox in 30 Minutes: • CSS FlexBox in 30 Minu...
➡️ JavaScript in One video: • JavaScript in One Vide...
➡️ ECMAScript 6 in One Video: • ES5 & ES6 | ECMAScript...
➡️ HTML5 in one video: • HTML5 Tutorial in One ...
➡️ CSS3 in one video: • Learn Complete CSS3 In...
➡️ Bootstrap4 in One video: • Bootstrap 4 in One Vid...
➡️ Jquery in One video: • jQuery in One Video in...
➡️ JSON in one video: • JSON in One Video in H...
➡️ ReactJS in one video: • ReactJS For Beginners ...
➡️ PHP in One Video: • PHP TUTORIAL IN ONE VI...
➡️ NodeJS in one video: / ipnwakoibt
➡️ MySQL in one video: • Complete SQL & MySQL i...
********** CLICK HERE TO WATCH ************
➡️ Fetch API in JavaScript: • Fetch API in JavaScrip...
➡️ AJAX tutorial for beginners in Hindi: • AJAX tutorial for begi...
➡️ Template literals (Template strings) in ES6 in JavaScript in Hindi: • ES6 Tutorial #3: Templ...
➡️ Async Await in JavaScript in Hindi: • Async Await in JavaScr...
➡️ Promises in JavaScript in Hindi: • Master The Promises in...
➡️ Callback Hell in JavaScript: • Callback Hell in JavaS...
➡️ Advanced JavaScript in Hindi Playlist: • Advanced JavaScript Tu...
➡️ ECMAScript Tutorial in Hindi 2020: • Modern JavaScript ES6 ...
➡️ ES5 & ES6 | ECMAScript 6 in One Video in Hindi: • ES5 & ES6 | ECMAScript...
➡️ JavaScript Game Development Series in 2020: • JavaScript Game Develo...
➡️ Source Code Link: www.thapatechn...
➡️ Top 5 Programming Languages in 2020: • Top 5 Programming Lang...
➡️ Ludo Game JavaScript Link: • JavaScript Game in Hin...
➡️Plz show some love to My Siter RUclips Channel and Plz Subscribe Link: / @mayabeautyvlogs878
**************** MUST WATCH VIDEOS *****************
➡️ How to become a Full Stack Developer 2020: • How to become a Full S...
➡️ How To Become a Web Developer 2020: • How To Become a Web De...
➡️ How JavaScript Works: • How JavaScript Works i...
➡️ Follow me on Instagram: / vinodthapa55
Make Website Responsive Using Media Queries in One Video in Hindi | Web Design Tutorial in Hindi
➡️ Link: • Make Website Responsiv...
Guys, Please support my channel by SUBSCRIBE to my channel and share my videos in your Social Network TimeLines.
Don't Forget to Follow me on all Social Network,
Website Link: www.thapatechn...
Instagram Link: / vinodthapa55
Facebook Link: / vinodthapa55
Twitter Link: / vb55thapa
Facebook ThapaTechnical Page Link: www.facebook.c...
Good Morning Guys ♥ If you Like the video then Plz LIKE SHARE and Subs to my channel ok😍 Check my Instagram to Chat with me: instagram.com/vinodthapa55
✅ NodeJS Tutorial in Hindi 2020: ruclips.net/p/PLwGdqUZWnOp00IbeN0OtL9dmnasipZ9x8
✅ Express JS Tutorial In Hindi in 2020: ruclips.net/p/PLwGdqUZWnOp3Vqww2cL5KbDkShj4NMRzk
Sir please ads web project create now
where is source code?
res.send(); me string pass kroge to string jayegi as a response
Par object yaa array pass kroge to JSON data Jayega .
Par agar res.json(); use Kara hai to Kuch bhi daalo json file hi return krega.
The res.send function sets the content type to text/Html which means that the client will now treat it as text.
res.json function on the other handsets the content-type header to application/JSON so that the client treats the response string as a valid JSON object.
wrong in both situation content type will be json
if you send html then it will autometically change to text/Html in res.send if you send json it will autometically change to content-type header to app
1. res.send()
Purpose: res.send() is a general-purpose method used to send a response of various types, such as strings, buffers, arrays, or objects.
Content-Type: The Content-Type header is set automatically based on the type of the argument passed:
If you pass a string, it sets Content-Type to text/html or text/plain (depending on the string content).
If you pass an object or array, it sets Content-Type to application/json (similar to res.json()).
2. res.json()
Purpose: res.json() is specifically designed to send a JSON response. It automatically converts the JavaScript object or array you pass into a JSON string.
Content-Type: The Content-Type header is always set to application/json.
Automatic Conversion: The method automatically handles converting non-JSON-safe values like undefined into null in the JSON output, making it more predictable for sending JSON data.
res.send() sets the Content-Type header based on the type of the argument passed. For example, if you pass an object, it will be set to "application/json".
res.json() explicitly sets the Content-Type header to "application/json", regardless of the type of the argument.
The res.send function sets the content type to text/Html which means that the client will now treat it as text. It then returns the response to the client.
where as The res.json function on the other handsets the content-type header to application/JSON so that the client treats the response string as a valid JSON object. It also then returns the response to the client.
no, i have checked . the content type is json even through res.send
Brother check this video again. When sir was using res.send and res.json both cases content-type was application/json
res.send automatcally detect the content-type
Thank you so much, because of your effort, my understanding is becoming stronger everyday. I must admit, for you webdev is fun for me, im enjoying the roller coaster ride.. Another very interesting part is going to start from your next video.Excited to see it. :)
Two basic difference that I got from Internet:
1.
res.send(200); returns source code
res.json(200); returns object
2.
res.json({'content-type' :'application.json'});
res.send({'content-type':'text.html'})
Daily m watch your videos.... I learn a lot from this
Glad to hear that, Plx share with your friends too
Content-Type
res.send() => The Content-Type header is automatically set based on the type of body parameter being sent.
res.json() => The Content-Type header is explicitly set to ‘application/json’, indicating that the response contains JSON data.
Data Handling
res.send() => This method is used as general-purpose and can be used to handle various types of data and the content type will also set automatically according to the data.
res.json() => This method is specially designed to send JSON response means it will convert all type of body params into JSON object.
Stringification
res.send() => This method doesn’t perform any automatic JSON stringification.
res.json() => This method automatically converts the JavaScript Object passed into it to JSON-formatted string.
Data Formatting
res.send() => It doesn’t convert or format the data given to them.
res.json() => You can format the returned JSON data by using json replacer, json spaces etc.
Use Case
res.send() => More versatile and can be used when you want to send different types of data without explicitly indicating that it’s JSON.
res.json() => Specifically used when you want to send JSON-formatted data and want to be explicit about it.
if I am writing res.json(404) then res.json forces the argument to JSON and I am writing res.send(404) then his will return a status code 404 not found.
🔥
bhai mera RES.WRITE( ) se html contant show nhi ho rha.....html contant ko show krwane ke liye guys aapko res.write() se pehle.......res.set("Content-Type", "text/html"); ye set krna pageda...tabhi aap show krwa sakte ho
Ye sab kuch dekha k yeda bana raha hai 🤣🤣🤣🤣🤣supper sir
Concept is totally clear 🙂 thanks
Sir please make a video on Complete Full React website of e-commerce...
yeah please do
thankyou bro, BOOM!
your teaching style is awesome 😍
send: Sends data and end the request. res. json: Sends data in JSON format and ends the request.
this is the difference between res.send and res.json
Vinod sir.
i want a video on react virtual DOM.
please u do any video on that.
❤️
Sir plz make video on How to use css Wave animation as preloader.
Awesome tutorial sir ji
Good morning thapa Bhai 🙏🌹😀
good morning
Bhai ap gzb ke bande ho
Json me jo data hàm send karne vale hai o frontend pe html page pe kese dikhayenge
Tysm bro bcoz u l learned Node js
helllo
when we input Normal text in send.json("Normal Text") then this text output will be "Normal Text"
Please make a video on psd to HTML responsive without bootstrap
You are awesome 👍
1:40 op bhai 😂😂😂😂😂😂😂😂
Thanks bro really helps Love u
superb video. Thanks
Jese apne json send Kiya but mai uss json ko table ke format me page pr display krwana chahti hu kaise karu please thoda idea dijie ..?
You are awesome men!
thnks sir
those who are getting the status code as 304 can unable the "disable cache" button in network on the top.
hello sir mujhe react redux ke through server side rendering krni h but ho nhi raha kya ap espe ek video bana skte h plzzzzz
Sir product slider pe video banao please...
very nice
Good morning sir
Hi @Thapa Technical,
can you share folder you have explained in whole tutorial of node.js.
If you have github link then please share.
Bro hum nodejs backend me jo data hai frontend par kaise send kren
Hello sir , how we get express routes called in network section of browser because as per your video. I have seen temp route in network but i can't see this in my browser, so can you explain what's the problem???
Awesome
Can you make a video on how to send images as json response?
Boom guys😂
Sir ya complete viedo ha kya nodejs ka
mere to content type lika hua hi nhi aa rha h header m
Please make video on e-commerce website using MEAN stack 🙏
nice
get me mai json data pass kar rahahu to muje network mai status code : 304 a raha hai
Sir plz tell me the intro song name plz, I have a humble request to you sir plz plz 🙏
sir nice video. sir this is template not temprature
Sir awesome video , I have made a website using php and mysql,how to upload it on internet from scratch ,sir please reply
you need hosting and domain knowledge
if you already have that information then just go and purchase domain and hosting, the hosting provider will provide you cpanel
in Cpanel you will have the option to upload to your files, there you can upload your php files, feel free to contact with me email: hdekstop@gmail.com, with email subject as (technical thapa youtube)
Teach us ideas on mern stack free lancing
Api kaise banaye, kaise implement kare aur api kaise kaam kartyhy batado bhai
First view
mix videos very better than seperated beacuse its very baddy for learners continuety
This guya doesn't deserve just 50k views
This guy makes such awesome video
bro plz explain difference between npm vs npx....
Sure 👍
npm is node package manager while npx provide installation of react application environment directly from server not through npm
Source code kahan hai?
😍😍
I am getting 304 status not 202
itna achha website dekha ke eda band diya was op lol
Bhai ab to free kar do yar source code😔
Bhai please fantasy application bnana btao 😭😭😭
❤️❤️❤️❤️❤️❤️❤️❤️
Difference pta Ni lga sirr
baar baar boom mat bola kro chutiypaa lgta hai
:))
so true
Lot of useless talks