Hi everyone and welcome to this lecture on Postman and how it can be used
to streamline the process of working with APIs for our react native applications.
Postman is a free tool that allows
developers to send Http requests and view the responses in a user friendly way.
It's particularly useful for testing APIs
during development as it allows developers to put test different endpoints
and parameters without having to write any code.
Let's get started with a quick demo of how
to use Postman to test a simple API endpoint.
So I'm going to open up our code from before where we just wrote a simple
Get request that was responding with Hello World response.
I'm going to run our nodemon using
nodemon server JS in my terminal, and my server is currently running on port 3000.
And now I'm going to open up Postman and then I'm going to go to my workspaces
really quickly and I'm just going to open a new Http request window.
And here all I'm going to do is write local host localhost.
We're running on port 3000, so I'm going to write 3000 here.
So I'm just going to do this.
I'm going to say that I'm making a Get request and I'm going to send it.
And here you're going to see our Hello World response.
So in the previous videos we used browser for this, but as we're going to be
learning more request types that we're going to be making, such as Post, Put,
and Delete, it's going to be very hard to test those using browser.
So that's why I recommend postman. Now.
How can you get postman?
If you want to get Postman,
just go to Google, search for Postman, click the first link here,
and then product and get started for free and download it for your device.
Once you're all set and you have everything installed,
just open up your account I'm already logged in in my account.
And then go to home or workspaces.
Create a new workspace.
I use this one that I already had created.
Click on New, write your localhost route here,
select the type of the request that you want to test, and just click on Send.
And for Get request, you should be able to get the same output as we had here.
So that's all for postman.
This is how easy it's going to be for us to test our APIs.
And if you're interested in server side development and want to create more
complex APIs, then Postman would be very useful to you.
I'll also demonstrate how to use Postman
to test APIs that require specific parameters later in this section.
In conclusion, I just want to mention that Postman is a powerful tool
for testing and debugging APIs for your react native applications.
With Postman, you can quickly and easily
test different endpoints and parameters and integrate it into your development
workflow to streamline the process of working with APIs.
Thanks so much for watching and I'll see you in the next video.