Это видео недоступно.
Сожалеем об этом.

🔴 #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...

Комментарии • 91

  • @ThapaTechnical
    @ThapaTechnical  3 года назад +10

    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

  • @mrankushtechnical
    @mrankushtechnical 2 года назад +34

    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.

  • @saurabhsinghchauhan5219
    @saurabhsinghchauhan5219 3 года назад +23

    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.

    • @mtalhamadni6605
      @mtalhamadni6605 3 года назад +7

      wrong in both situation content type will be json

    • @brandedmunda6281
      @brandedmunda6281 2 года назад +1

      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

  • @vickykumarmodi7
    @vickykumarmodi7 4 дня назад

    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.

  • @axnplayz3483
    @axnplayz3483 7 месяцев назад +1

    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.

  • @bipinmsit7380
    @bipinmsit7380 3 года назад +24

    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.

    • @mansoorabbas5386
      @mansoorabbas5386 3 года назад +2

      no, i have checked . the content type is json even through res.send

    • @basiccomputer6954
      @basiccomputer6954 2 года назад +2

      Brother check this video again. When sir was using res.send and res.json both cases content-type was application/json

    • @krishankumar8720
      @krishankumar8720 2 года назад

      res.send automatcally detect the content-type

  • @user-ql7pw7ld1n
    @user-ql7pw7ld1n 2 месяца назад

    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. :)

  • @urvishjaiswal5271
    @urvishjaiswal5271 2 года назад +7

    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'})

  • @nirjhariniparhi
    @nirjhariniparhi 3 года назад +4

    Daily m watch your videos.... I learn a lot from this

    • @ThapaTechnical
      @ThapaTechnical  3 года назад +3

      Glad to hear that, Plx share with your friends too

  • @gaudanikaushik1849
    @gaudanikaushik1849 4 месяца назад

    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.

  • @miteshdudhat7129
    @miteshdudhat7129 3 года назад +7

    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.

  • @VinaySingh-zp6sr
    @VinaySingh-zp6sr Год назад +1

    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

  • @examtak6182
    @examtak6182 Год назад +1

    Ye sab kuch dekha k yeda bana raha hai 🤣🤣🤣🤣🤣supper sir

  • @gamingminaty7538
    @gamingminaty7538 Год назад +1

    Concept is totally clear 🙂 thanks

  • @gurinderpartapsingh8694
    @gurinderpartapsingh8694 3 года назад +8

    Sir please make a video on Complete Full React website of e-commerce...

  • @jaikrishna3586
    @jaikrishna3586 2 года назад +1

    thankyou bro, BOOM!

  • @vishalbhati5816
    @vishalbhati5816 2 года назад +1

    your teaching style is awesome 😍

  • @Thefarhandeveloper
    @Thefarhandeveloper Год назад +1

    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

  • @pshubham9
    @pshubham9 3 года назад +2

    Vinod sir.
    i want a video on react virtual DOM.
    please u do any video on that.
    ❤️

  • @Shatakshigoenka
    @Shatakshigoenka 3 года назад +3

    Sir plz make video on How to use css Wave animation as preloader.

  • @GhostRider....
    @GhostRider.... Год назад +1

    Awesome tutorial sir ji

  • @anukashyap4817
    @anukashyap4817 3 года назад +2

    Good morning thapa Bhai 🙏🌹😀

  • @Rahul-kb2gr
    @Rahul-kb2gr 3 года назад +2

    Bhai ap gzb ke bande ho

  • @rohitluckyrs4567
    @rohitluckyrs4567 3 года назад +1

    Json me jo data hàm send karne vale hai o frontend pe html page pe kese dikhayenge

  • @altafshaikh9926
    @altafshaikh9926 2 года назад +1

    Tysm bro bcoz u l learned Node js

  • @BJROne
    @BJROne 2 года назад +1

    when we input Normal text in send.json("Normal Text") then this text output will be "Normal Text"

  • @alilateefsheikh3823
    @alilateefsheikh3823 3 года назад +1

    Please make a video on psd to HTML responsive without bootstrap

  • @chaitanysangole1774
    @chaitanysangole1774 3 года назад +1

    You are awesome 👍

  • @vagheladarshan9817
    @vagheladarshan9817 Год назад

    1:40 op bhai 😂😂😂😂😂😂😂😂

  • @khelanmehta1554
    @khelanmehta1554 3 года назад

    Thanks bro really helps Love u

  • @rajuraj1257
    @rajuraj1257 3 года назад

    superb video. Thanks

  • @jyotikamat1787
    @jyotikamat1787 2 года назад

    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 ..?

  • @nicetomeetugaming7024
    @nicetomeetugaming7024 2 года назад

    You are awesome men!

  • @aliyanarjis3118
    @aliyanarjis3118 5 месяцев назад

    thnks sir

  • @rohitrout6450
    @rohitrout6450 2 года назад +1

    those who are getting the status code as 304 can unable the "disable cache" button in network on the top.

  • @ReactSinghCoder
    @ReactSinghCoder 3 года назад

    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

  • @moinuddinchudiwal9347
    @moinuddinchudiwal9347 3 года назад +1

    Sir product slider pe video banao please...

  • @faisalmahmood8055
    @faisalmahmood8055 Год назад

    very nice

  • @Sp-px7gn
    @Sp-px7gn 3 года назад +1

    Good morning sir

  • @Sinhasuraj13
    @Sinhasuraj13 2 года назад

    Hi @Thapa Technical,
    can you share folder you have explained in whole tutorial of node.js.
    If you have github link then please share.

  • @anshuvishwakarma6020
    @anshuvishwakarma6020 2 года назад

    Bro hum nodejs backend me jo data hai frontend par kaise send kren

  • @roshanlashkari6082
    @roshanlashkari6082 3 года назад +1

    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???

  • @shivanigoswami2773
    @shivanigoswami2773 3 года назад

    Awesome

  • @kaustubhjoshi8093
    @kaustubhjoshi8093 2 года назад

    Can you make a video on how to send images as json response?

  • @darktaib
    @darktaib День назад

    Boom guys😂

  • @manishbhandari5531
    @manishbhandari5531 3 года назад

    Sir ya complete viedo ha kya nodejs ka

  • @aryankhandelwal15
    @aryankhandelwal15 Год назад

    mere to content type lika hua hi nhi aa rha h header m

  • @dineshshinde4691
    @dineshshinde4691 2 года назад

    Please make video on e-commerce website using MEAN stack 🙏

  • @pawanbhatt9348
    @pawanbhatt9348 2 года назад

    nice

  • @abcdabcd7057
    @abcdabcd7057 3 года назад

    get me mai json data pass kar rahahu to muje network mai status code : 304 a raha hai

  • @_mukumemories
    @_mukumemories 2 года назад

    Sir plz tell me the intro song name plz, I have a humble request to you sir plz plz 🙏

  • @sufyankhan9823
    @sufyankhan9823 2 года назад

    sir nice video. sir this is template not temprature

  • @reshmasharma2931
    @reshmasharma2931 3 года назад

    Sir awesome video , I have made a website using php and mysql,how to upload it on internet from scratch ,sir please reply

    • @homedekstop2484
      @homedekstop2484 3 года назад

      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)

  • @pjos2981
    @pjos2981 3 года назад

    Teach us ideas on mern stack free lancing

  • @anowarulhassan5117
    @anowarulhassan5117 3 года назад

    Api kaise banaye, kaise implement kare aur api kaise kaam kartyhy batado bhai

  • @aadarshyadav4712
    @aadarshyadav4712 3 года назад +3

    First view

  • @user-ls5rj7cf3c
    @user-ls5rj7cf3c 7 месяцев назад

    mix videos very better than seperated beacuse its very baddy for learners continuety

  • @philomath1964
    @philomath1964 2 года назад

    This guya doesn't deserve just 50k views

    • @philomath1964
      @philomath1964 2 года назад

      This guy makes such awesome video

  • @ashoklrawat2287
    @ashoklrawat2287 3 года назад

    bro plz explain difference between npm vs npx....

    • @ThapaTechnical
      @ThapaTechnical  3 года назад +1

      Sure 👍

    • @mansoorabbas5386
      @mansoorabbas5386 3 года назад

      npm is node package manager while npx provide installation of react application environment directly from server not through npm

  • @Avinashkumar-mz2up
    @Avinashkumar-mz2up 3 года назад

    Source code kahan hai?

  • @SubhamKumar-9009
    @SubhamKumar-9009 3 года назад

    😍😍

  • @ajayjangid5968
    @ajayjangid5968 3 года назад

    I am getting 304 status not 202

  • @csharp9097
    @csharp9097 3 года назад

    itna achha website dekha ke eda band diya was op lol

  • @techhelper9054
    @techhelper9054 Год назад +1

    Bhai ab to free kar do yar source code😔

  • @divya_shaktiyan
    @divya_shaktiyan 3 года назад

    Bhai please fantasy application bnana btao 😭😭😭

  • @pritamchakraborty4407
    @pritamchakraborty4407 3 года назад

    ❤️❤️❤️❤️❤️❤️❤️❤️

  • @cricbolly3252
    @cricbolly3252 3 года назад

    Difference pta Ni lga sirr

  • @VishalSingh-kq8gz
    @VishalSingh-kq8gz 3 года назад +5

    baar baar boom mat bola kro chutiypaa lgta hai

  • @anshulcse5733
    @anshulcse5733 2 года назад +1

    Lot of useless talks