In this video.
Let's go ahead to test our endpoint using the tender client extension.
So for this, we are going to create collection for a specific endpoint.
So to do that, click on this icon and click on collection.
The first one I'm going to be using this collection
account collection.
So let's start with the user.
So let's click this one to add new requests.
And the first one I'm going to be as register and then the user is going to be as a t t p colon for
slash voice slash look host colon 9004 slash API for slash version one for slash users and for slash
register.
And then the method is going to be as post requests.
So let's save it and let's hit send.
You can see that we have four four.
So what happen even though we have the root here?
So what is the problem?
The problem is that any time we make changes to our code, we need to restart our server and we are
going to install Node one in just a second to avoid this.
So when I send the request again, you can see I have the registered root, so let's install the Node
one package
and for this we are going to install it as the dependency.
So our hit enter.
So let's configure the package or casing file to use normal and let's add our scripts server and then
colon.
I'm going to use Node Mom, Colon Node Mom and then the name of the file which is server dot G's.
So this time around I'm going to use the server script here
and it is using Node Mom.
Great.
So let's continue to implement the testing.
So let's collapse this one and let's go back to the ten dot line extension.
So for this, let's show you save it.
So let's copy this one.
We can duplicate that one, click here and then duplicate and change this one too as logged in and here
let's change the last endpoint to look in.
Let's hit enter and it's working.
The next one, I'm going to be the whole file.
So here, let's change this one to Pro File also.
And this time around we're going to be get requests and forward slash profile for slash some ID, hit
enter.
And you can see that there is no route for this.
So let's check our server file to make sure that it exists.
Oh, sorry, guys, I forgot to add the colon here, so save it.
And now let's send again.
Wow.
I still have an error.
So what is the problem?
Oh, sorry.
Again, this.
I'm going to be as get replace.
Sorry, guys.
So let's hit send and now this is my file endpoint.
Then this one going to be the delete and then the updates.
So back to the client.
So let's duplicate this one as delete.
Let's rename this one and change to the leads.
And for this we need to add the HTTP method and for delete you don't need the profile, but instead
we need to have some random ID and let's hit send and this is a delete.
The next one is going to be updated.
So let's rename this one to update
rename.
An update.
And here we go.
Let's save it and let's change this one to put requests and let's hit send where as we get some error,
let's check again my server file for updates.
So let's go down this End Point.
Oh, sorry, guys.
I forgot to bring the column here back on my side.
So here, let's remove the profile here.
Sorry, guys, and let's hit send.
And now I have the update.
Now all the endpoint for the user is complete.
The next one is let's work on the transaction, so let's collapse this one and now let's get back to
transaction.
So let's add our first requests and it's going to be as create transaction and then let's copy the you
are here and inside the transaction, let's pass eight and change the API version one to transactions
and then the method going to be post method and there we go.
So let's go ahead to duplicate this one and let's change this one to delete.
So here you're going to be delete and you pass in some ID and let's hit send.
This is delete.
The next one is going to be fetch single transaction.
So let's rename this one to single single.
So here is going to be get requests and let's get send and get transaction.
The next one is going to be as.
Updates.
Let's change the method to hoots and let's get sane.
So after this, let's see.
We have post leads, single update.
I think that's what we need.
Or we can add getting all transactions.
So here is going to be as or and then change this one to get and let's remove the ID and get transactions.
So now our transaction testing endpoint is complete.
Then this one going to be the account creation is going to be the same process.
So our first request is going to be as create also and then the you are or the endpoint is going to
be account.
And here is post HTTP method, it's signed and there we go.
And after creating we also need or we also want to fetch all accounts.
So here change this one to get save it and there is no endpoint for fetching or account.
So we can go ahead and add that one quickly.
So back to the server file.
Let's see where we have the account, this account root and let's scroll down and let's copy one of
this ones and paste here.
We're going to be as gets.
And here as account and here as account and here as gets.
And let's change this one to get account.
Save it.
And now let's get to all four account.
So this one so let's hit saying and I have the get account rule.
So let me close all these open tabs and now let's continue on after getting all we also want, let me
collect this one again.
I also want to find a single account if we want.
So here is going to be a single account.
So here we add some random ID here to match that endpoint.
Again, the is the end point for that.
So let's go ahead and also add that one quickly here.
So here, let's see, we have this ones and there is no where we have it and supposed to be gets.
Sorry guys.
So here let's click on sign and there we have it.
So after this one, what we need to create when I read the delete and then the update.
So here is going to be as delete and here change the method to delete, save it and let's hit st and
then we go after deleting.
We also need to add the updates.
So here let's rename this one to update and change the method to put requests and here we go.
So in the next video, let's go ahead and then refactor this one to use MVC design pattern.
All right.
So let's get rocking in the next video.