Online fake REST API

preview_player
Показать описание
In this video we will discuss creating a fake online REST API.

Text version of the video

Healthy diet is very important for both body and mind. We want to inspire you to cook and eat healthy. If you like Aarvi Kitchen recipes, please support by sharing, subscribing and liking.

Slides

Angular CRUD Tutorial

Angular CRUD Tutorial Text Articles & Slides

All Dot Net and SQL Server Tutorials in English

All Dot Net and SQL Server Tutorials in Arabic

What is REST API
REST stands for Representational State Transfer. REST is an architectural pattern for creating an API that uses HTTP as its underlying communication method.

The REST architectural pattern specifies a set of constraints that a system should adhere to. Some of these constraints are Client Server constraint, Stateless constraint, Cacheable constraint, Uniform Interface constraint etc. We discussed these constraints in Part 1 of ASP.NET Web API tutorial. Let's quickly recap the Uniform Interface constraint.

Uniform Interface - The uniform interface constraint defines the interface between the client and the server. To understand the uniform interface constraint, we need to understand what a resource is and the HTTP verbs - GET, PUT, POST & DELETE.

In the context of a REST API, a resource typically represents a data entity like Product, Employee, Customer etc. The HTTP verb (GET, PUT, POST, DELETE) that is sent with each request tells the API what to do with the resource. Each resource is identified by a specific URI (Uniform Resource Identifier) or URL (Uniform Resource Locator). The following table shows some typical requests that you see in an API.

Resource Verb Outcome
/Employees GET Gets list of employees
/Employees/1 GET Gets employee with Id = 1
/Employees POST Creates a new employee
/Employees/1 PUT Updates employee with Id = 1
/Employees/1 DELETE Deletes employee with Id = 1

Depending on the server side technology you use, there are many frameworks that we can use to build a REST API. For example, if your server side technology is Microsoft Dot Net, you can use WCF or ASP.NET Web API to create a REST API.

Since this is an Angular course, and to stay focused on it, let's create a fake REST API using JSON Server. In our upcoming videos, we will perform all the CRUD operations using this fake REST API.

The following is the JSON Server Github page

Execute the following command to install JSON server
npm install -g json-server

Execute the following command to start the server

Рекомендации по теме
Комментарии
Автор

thank you a lot for providing very good and very well explained Angular CRUD. currently, m learning Angular8 but this Angular5 CRUd is very benificial and very helpful for me .All my doubts, confusion got cleared because you have explained it in very good ways.Thank u Sir.U because i have got angular knowledge from you through this angular5CRUD. Sir you voice is very soothing nd good nd melodious.. I have watched videos on angular of others on youtube but your angular5 CRUd is excellent. The way you have explained it in detail is excellent., the way u have presented is excellent. lots of thanks for teaching Angular. . .approx8 videos are still left that i have to complete from your angular crud videos . You posses very deep knowledge of Angular..you have helped me a lot .lots of thanks.God bless u :) :) ..

AbhishekPandey-gwxx
Автор

thank you sir. i am big fan of yours. I learnt everything from your online tutorials. Thanks for giving us valuable knowledge. God bless you.

bhaskarmishra
Автор

You mentioned we can use postman to check the api, but what URL should we put there to get he api data?

vaibhawkr
Автор

Hi Venkat, can we have a one video on angular 4+ unit testing

shrikantkayandekar
Автор

I think redux and PWA are important concept and it will be great if these added in angular series

anojkumar
Автор

when trying to start the server, it is throwing error(used this command) :- json-server --watch db.json
Showing Error:-
json-server : The term 'json-server' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ json-server --watch db.json
+
+ CategoryInfo : ObjectNotFound: (json-server:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

styleman
Автор

thank u very much sir..upload more videos

Pritamdas-bgfp
Автор

Such a very useful information this tutorial

Devnikakiduniya
Автор

Sir, please Lazy loading component video

mdabuzar
Автор

sir please make Tutorials on PHP Mysql

srikanthambaldhage