Hello, friends.
Welcome back.
Now it's time to bring our front and back end together and make this as a full application.
Until now, we have been using postmen to test our back to see our response matches the expectation.
So in order to bring our front end and back end together, our main task is to make it to it so that
our front end instead of postman is the one that makes this request.
For example, when the user visit, a specific article of intent need to automatically make the request
to comment for that article and then it needs to display that information on the correct places on the
page.
And we also want to make it so that our front line will allow users to comment on the article.
So there are many libraries that we can use to make a request from our front end, but in our course
we will simply use fetch.
OK, so fetch is simply a synchronized function that we can call from a printing store.
So if there is a built-In API to the first argument will be the order which tells users which end point
to hit.
And the second argument is optional.
The options object that we can use to specify details about the request we want to send.
For example, this is where we want to specify a method if we want to have a get.
Our request, and it also us to specify the body of our request, as well as some other useful things
such as headers and one more thing, the default value for this matter is that so if we don't specify
this argument, the Fed will send a request to the endpoint.
We specify that is a built in function.
So we don't have to import anything into our code base, but we need to fix it for Internet Explorer
because it won't work in Internet Explorer.
So to make it work on Internet Explorer, we need to do in an instant.
OK, so make sure to stop this terminal.
OK, and we need to go to the front end directly.
So let's do then we need to type code and then we need to go to fenthion directly, which is my friend
blog.
OK, so make sure that you are inside this my friend blog.
This is the front directory and the URL we need to do and VM install does the safe and the package that
we need to install is what W.G. Typhon fetch and press enter.
Now we need to go to Index Dargis and inside index Jorges.
We need to film at the top.
OK, and we need to write in code what W.G. Hyphen Fetch and then we need to see this fight.
OK, let's wait for this package to get installed.
OK, all this package has been installed.
Now this will support Internet Explorer so we don't have to worry about Internet Explorer.
OK, so this is it for this video and I'll see you in the next hour.