Links mentioned: Details automatically generated.
summary

Speaker explains to Speaker the advantages of using fetch over axios. Speaker doesn't know if axios has built-in fetch. If it doesn't , they will continue using axios. Speaker has only had to use node fetch so far. Speaker thinks it's cool that node Fetch is going to be an official part of the internet. Speaker would be stressed out if they had to maintain the node Fetch library. Speaker would like to see more people involved in open source maintenance.

Speaker has a function in the server that allows they to make search requests from the back end. Speaker is making a call on the back end on the server. they need to be able to fetch data from the Twitter spaces, search API thing.

Using fetch is a get request. If you want to do a post, you can set the method to be pulled. Speaker explains to Speaker how to send data.

Speaker is going to post a library that was a third-party library officially. It's an HTTP 1.1 client written from scratch. Speaker has not watched Stranger Things yet. Speaker will install it the library and try it out to get used to the syntax. Speaker explains to Speaker how the response and the headers are organized. Speaker explains how the data is investigated.

Speaker is happy about the new library being built into node.js. Speaker has added new nodejs website. Speaker's computer is going wild. they want to be able to make calls. Speaker wants to see how the syntax works. they didn't use fetch. Speaker would like some clarification about this.

Speaker is going to create a promo video for this thing. they were working on it for 10 minutes. Speaker is working on a promo video for the thing coming up in a couple of weeks. Speaker will talk about it next week. Speaker is going to share some of the interesting things that they saw this week. Speaker is creating projects in JavaScript.

Speaker wants to get back to work. Speaker is going to send them's new song with a Pawnee called " Thank You Be " with new job ads.

Speaker uses a get library to make the front end of them website easier. Speaker wants to make it easier to make calls from the back-end through node to get fetch information from other places. Speaker has created a front-end for Zozo South. It's a back-end with fetches coming to node js. Speaker informs Jay that fetch will be built into node. It will be available behind the experimental flag. The LTS long-term service is on 16-point 13-point 12. If you want the latest features, you have to go for the fetch one. Speaker has a new version of Dash fetch, but he's not ready to put the flag yet. He's going to wait until version 18 is released. Speaker sends a link to a pull request with a screenshot and a commit that shows what went into it. Speaker is going to add a link as well.

topics
  • node js
  • json form
  • console log data
  • pull request
  • third-party library
  • import request
  • body mixin
  • feature sets
transcript

Well, the number of all changed since you hung around but those dreams everything, and they turned around each other.

Welcome back.

Welcome back.

Welcome back.

You always could spy rare.

Welcome back and I smile way I think.

And I know what you see you at learning.

What their son, never lead.

You Where we need you, I definitely think like, I am in some sort of time Loop thing or something because that went by super quick.

I don't know about for y'all, but I don't even like I didn't even like do what I normally do.

I download like my highlight video then post that to Twitter and Instagram.

It just went by super quick up.

I was I am going to be creating like a promo video thing.

For this thing.

I have coming up, and I was kind of putting together, the like the idea and like the script, and the things I wanted to say for it and like, I looked over, I am like, oh, I like 10 minutes.

Okay, so I went back to work.

It then looks back and like, oh, I have 30 seconds and I totally didn't do any of the other stuff that I normally do.

So.

Wow.

So that was a.

Yeah.

Yeah, so we're here now.

So good news is I think I kind of got to give got the script done.

It's going to be like a quick promo video for this thing that's coming up in a couple of weeks.

So maybe Next week I will talk about it and I will say what it is but there's some stuff I want to work on and get it together.

So all right, so welcome back and yeah, let us get into it because I want to get back to this work.

It's like the time this one by super quick.

Like I have no clue besides doing that script thing.

What I did for like that.

40 minutes.

I just went by super quick.

Wow.

Wow.

Okay.

Well, I think I ate.

Did I eat some?

I do remember?

All right, let us just get into it.

So I want to talk about something that I saw interesting.

What's it like this past week?

Yeah, and so let me share my screen and I came across this tweet that I thought was super interesting, share my screen.

I don't think I would need any audio, but I am going to do it anyway.

And so share that cool.

Yeah.

I came across this tweet on the 1st, February 1st, right?

I even like reply like hey congrats.

Okay, so I don't have any people do any sort of like back-end stuff like whatever.

I am creating projects inevitably.

I am going to run into some back, end things.

So seeing this was kind of cool.

So I do a lot of stuff in node js.

Since I do a lot of (JavaScript), I might as well do the back end in JavaScript pretty much.

So I use node.

Js and sometimes.

In the back end.

Like I may not, I am not only calling from, like, my database, forget information, but I made called out to like another resource to get some information, right?

And so a lot of times like if I need to hit up another third party API or like, for example site, I made find my next space since I mentioned it.

Let me just, I will type it up real quick.

Find my next dot space.

So the way that this works is that lets say oh so it helps find Twitter spaces, right?

And so what I am doing here, so let us say I am looking up web because that's going to bring a whole bunch of stuff and I searched that what's happening.

Is that on the back end because I am not doing the search requests on the front end.

I am I have a function in the server that will do.

The request for me because I don't want to have cuz I think it involves like API keys and stuff and didn't want to have that exposed in the front end.

So I am making the call on the back end on the server.

And, so I needed to be able to fetch the data from the Twitter spaces, search API thing.

And, so I need to be able to call so normally.

Okay, so let me I am going to put this in the list of links that you can check out.

So normally, like if you do it on the front end, there's the fetch API.

That you can use.

And so what you actually do is you just say, of course, is not going to actually tell me here, you see An example.

And again, an actual example, code sample.

Something has a better things like using fetch API.

Sorry.

Let me look for this real quick.

He's like using exempt.

Know what Using fetch API?

Yeah, there it is.

You thought I would been there before.

All right.

So for example, in your front end, you can just say fetch, this is a get request.

And so you can say the endpoint that you're looking for like the address of the place you're looking for and you just get then the response and you turn into a Json form.

Could lot times just like the string and then you get the data from that response to Json, you get the data and then you can console, log the data.

If you wanted to do a post, then you can actually set the method to be pulled.

So it's still the same fetch the URL.

You can say the method is post.

You can you do get post?

Put delete Etc.

I am saying like, um, and then if you want to do cores, all this stuff, so this is a more fleshed-out example.

As the same thing.

So you get you, this is sending data.

So you have this stringify, the Json, the information that you want to send and, yeah, cool.

So all that dust and then you see it returns a response that Json and then that's what's the data here and you can console log data.

So, this whole thing simplified down for just a get, is this?

And so that's what I use inside.

Like, my, if I want to make anything from the client from the front end, right?

Because before you could use thing, I think you can use jQuery, I think to do it, and there's like a bunch of different other like libraries that you could use that could do that for you.

There's one that was built in.

It.

Was it like, HTTP, something but that one was kind of like a lot.

There's a lot to it, like a lot template and boilerplate stuff like is a lot.

So, there's a bunch of different, like, libraries, that kind of wrapped around that native 12.

Make a little bit easier and then as time went on they just put fetch into the browser.

So just understands that in the JavaScript and stuff.

So yeah, cool.

So that came out of that.

So that's cool.

And now it's the similar thing happened with like that earlier example, about making calls from your back-end through node to get fetch information from other places.

So It was kind of like again, there was a way of doing it, but it was kind of lot.

And so there were other we call them other libraries again to be used on your server to help.

Make that a little bit easier.

So those like axios.

I use node Dash fetch a lot for mine because it was similar to this like the same syntax.

So I figure if I am doing it on the front end then hey, I want something similar on the back end.

So I don't have to do a lot of like switching, you know, I mean, like trying like oh wait, this was a front-end.

No way.

This back-end kind of thing.

So, yeah, so it's all I did there.

Alright, but now, just like with the front end from this tweet from McHale.

I am not there's like an umlaut over the E.

So I am not sure how to say it Zozo South's a.

So they said we did it fetches coming to node js which is kind of Awesome.

So let me save these links.

I just spoke about so you can check them out for yourself.

So first was the This one here using fetch.

And then we have the Tweet.

Cool.

And this was again on February 1st.

And I was like pretty amazing to goes the best nice.

It's going to actually come be built into node.

And so now and I even feel like congrats.

So the thing is, it will first be available behind the experimental flag.

That's dash.

Dash experimental Dash.

Fetch.

So thou let node know that you want to use fetch, right?

And then they're hoping to have it by default in version 18 point zero and right now.

No Jay.

Yes.

I think it's on 16.

Let me see here.

Yeah, okay.

Well, so the LTS long-term service, I think that is a long-term support that is on 16-point 13-point 12.

So that's like this point to it.

Sounds like the stable one.

Like that's like nothing's going to happen to that one.

But then if you want, like, the latest features and that's where you have to go for the fetch one.

Seventeen.

Point four point zero.

So this is the one you would need and then you would put the flag.

Egg dashed experimental Dash fetch to be able to use it.

I am not going to do that right now.

Yeah, I am saying like I am the type of person I like to make sure that it's in there, and they're all the bugs have been worked out.

So I am going to hold off, but that doesn't mean anybody else can't play with it.

So again, so you can do that, but they're hoping to have a default, my version 18, which should be pretty soon.

So, excited about that.

Yeah, cool.

That's a hey, congrats on.

Very first because I saw it in my God, this is great.

Congrats.

Alright, so again, congrats in line on video form, not just on Twitter.

So then so the actual pull.

So you can see there's a screenshot, right?

And it has the like the pull request.

So, you know, a lib ad Fetch.

And so that is this one here and it kind of, this is the commit that kind of shows like everything that went into it.

And, so I am going to add this link as well.

Well.

Alrighty, so if you want to check it out because what school was interesting is that if you go through here and kind of read all the different, it's kind of cool to see like what goes behind the scenes of all these different like things that we use on the web.

So this is like actual node that we use on the back end, you know, or at least I use, I don't know what you do, but it's way and so you see, they're adding Fetch, and they have headers in the request and the response.

That's awesome.

And you can also see that they're using a library that's already out now called this c and d g.

It's Italian for 11.

And so you can find that is it this one?

Think I opened it up.

So yeah, here it is.

And let me will, since I have this open.

I am going to post this into thing here as well.

So you can check that out.

We just so this is the library that was like a third-party library, but there I guess they liked it so much and it's similar to what they want to do.

Anyway, that they're going to take that library and put it into node officially and so, that's pretty amazing.

So as you can see here, so yeah, so it's an HTTP 1.1 client written from scratch for node.

Js.

So from the ground up.

So that's pretty cool.

So I guess that means it doesn't have like any dependencies, which is cool.

So, Indeed.

She means 11 in Italian.

So 1.1, you know, like 11:11 and Ichi, but it's also a stranger things reference.

So, I think there's a character by the name of stranger thing.

That's in stranger things.

I have not yet to watch that.

I know.

I know.

So then you have a question you can do as a so if you want to kind of play with what's going to be coming.

So I may do something like that where I will install it the library and then try it out.

And, so I can maybe get used to the syntax.

But so they kind of show so like, here's a quick start.

So I am thinking you probably just have to say like import request from Fetch.

Maybe cuz I don't know if they're going to keep the same name.

I think it might be fetched.

So I am not sure.

But so you're able to like, remember that same like request.

It might be just be fetched.

I think just like how it was here.

And then so like how they're awaiting fetch here.

See there are waiting request basically the same thing and then from that they're pulling out all these things like the status code.

Did it come back for 200, you know, like it was a cool the headers on there?

I am not sure where trailers are, but I guess if you have headers and trailers, I guess makes sense.

And then like the body, like the information and everything, and then you can see the response, received the headers, and then They're doing this.

Normally.

You can do like body dot Json, and they will show that, but there are waiting it and investigating the data much like how.

Nope, that's not what I was looking for here.

Much like how they have the response dot Json here.

So is the same as the body from the response, right?

And then whatever trailers are I have to look that up, but then you can do the body mixin from the standard from the fetch standard, which I did not know.

That was a mix in like the body dot Json.

So that's pretty cool.

So yeah, so they can get the data that way.

What else?

And then again, trailers have no clue, trailers are, I am had to look that up.

And yeah, so that's the whole thing.

So now you be able to do all that with in node itself without having to rely on third-party Library.

So that way you don't have to worry about like compatibility because if the library doesn't isn't get update anymore.

Because remember a lot of these things like open source, any kind of relying on people.

To have the time to be able to keep things up.

And so yes, at least this it will be built into node js and it's cool that all these other libraries kind of like I think helped shape, you know, like hey, we should have this within node and so like there's like a big demand for it.

And so that's pretty cool.

And yeah, so that's that one.

What was this?

Oh, that's just nodejs and then I added that.

Right?

No.

I did not add new node js website.

So if you want to Get out for yourself.

Maybe check it out to see when.

18 is out and then it's actually in there but that's kind of wanted to talk about like visit.

These are things that are coming, which is pretty cool.

All right, and then if you want like a better explanation like in video format chassis Fire Ship, they did a whole thing on it on the 4th.

So just like a couple of days ago so big new feature lands in node.js and there's like a few other things as far as like readable streams and stuff, but I don't do a lot of that.

And so maybe if I dive deeper into it, I will do that because yeah, it's that stuff is like above me right now?

You know me.

I just want to be able to make calls.

The places and the backend for right now.

Like I kind of did some like readable streams stuff like with files and things and now just like now, I am good.

I am good.

I am cool.

So but yeah, there's that so shouts of Fire Ship always doing really good stuff and someone put a link to that video.

Also in the list of links that will be next to the recorded video.

All right, so I think that's going to be it.

Yeah, so A my computer is going wild.

All right, so over time as usual, but I wanted to talk about this because I think it's super cool and it's kind of awesome.

So shout to the whole team for making it happen.

And looking forward to checking it out.

Like I said, I am a, so I can get the start to get the like the syntax kind of working.

I made try out and Ichi.

I probably said that wrong again.

But yeah, I want to see how the syntax is going to be.

Are they going to keep fetch because indeed, she didn't use fetch?

So all I am just, so I am sure this probably Like information somewhere.

And you can see people are super excited about it, which is an always cool to see.

So, yeah, so then this was like, would appreciate some clarifying.

Why is this significant?

What advantage does?

This provides over using axios?

One of the libraries that were previously being used?

And then, so this process is like, well, library is just the tool, and I guess this Beat tool.

Oh waits this something.

Best tool now comes out of node.js box, doo.

You can use whatever you want.

But most of the times fetches more than enough.

So yeah, so there may be other like edge cases.

Because like I said, fetch, it's kind of like a simplification of like, a more complex thing.

And so axios or some of the other ones, may do things that fetch may not be able to do your, I mean, and so at least coming out of the box, so you kind of have to know you use case.

So if there's a thing that you're using like axial, specifically for because it's like a thing that's kind of like difficult and actually is making it easier.

I guess check to see.

If the built-in fetch, does it?

If not, then you can continue using axios because I will still work.

That's what's cool about the web.

You know, I mean, so yeah, like I said for me, it is just making calls to other like endpoints other servers and talking to them.

So, so far.

I have only really had to use node fetch, you know, I mean, so, Yeah.

Yeah, it's like this person's like bye-bye node, Fetch and axios.

And then, I am not familiar with fetch.

But don't they have different feature sets, especially looking at axios and then this Brazilian like, yeah, I think actually has a lot more functionality, but we just want to make a simple HTTP request and node is not ideal that you have to install a third-party dependency and like, yeah, that makes sense.

I don't see axi alexios and other going, We're then exactly so it's all there like they just all tools.

So you have to know what you're doing with the tools.

So and know what you want to work from the tools and so yeah.

Chinese.

So then you have other people who What's your call?

It is cool.

Like the internet is always like discussions about stuff.

So, that's pretty cool.

So like this person's got like no, I don't really want it in there and there's like a discussion happening.

So that's pretty cool.

As long as there's no, what you call it, like disrespect, you know, and so in the of course, it's got to be like a meme.

So node Fetch and do feel kind of bad like node fit.

But maybe that frees up the maintainer of node fetch.

You know, I am saying because who like the Work on no fish like okay.

Whoo.

Now, we don't have to worry about this anymore.

You're not mean they can move on to other things possibly or what have you, you know, I mean, so I don't know but I think it's cool that it's going to be an, and they can always like contribute to fetch that's going to be a node js as well.

They just don't have to have liked it all on their shoulders, you know, to maintain the library.

So yeah, I think I don't know if it was me and I have like node Fetch and like a bunch of people like relied on it.

It and I would have to keep up with like any other changes in the ecosystem than make sure I did it.

But I had to make sure that it didn't break previous ones and all these things like that would be a lot of stress.

So shouts, everybody that does like open source maintenance and things you all are awesome.

Yeah, I mean and so yeah because just the stuff I do at work and things like this little stuff I do.

I am like, yo, I could not imagine if like tons and tons of people were using it, you know, I mean Is my little web component thing and people are using it.

I was like, oh man.

What if I break this it or just all sorts of stress.

So y'all are the heroes?

I mean, so shout out to you all.

Okay.

Now I blabbered on long enough because I want to get back to this work.

Sorry, but this is super cool and I just wanted to get that out there.

Alright, so going to get you all back to work because I know I want stuff to get done.

So I am going to send you all with this traveling music.

This is new Jabez whose Today is February 7 along with J.

Dilla.

So, yeah, so it's just it's cool that we're playing this track and it's featuring a Pawnee be, it's called.

Thank you.

All right.

So again, thanks for hanging out.

See y'all 15 minutes after the hour.

Let us get this work in.

All right.

Thanks.

Y'all.

See you later.

Cool, boo.

All right, here we go.

New job ads.

Featuring a Pawnee.

Be the track is called.

Thank you.

I am not sure what But I am going to be out here.

So, thanks y'all.