-
Understanding State Transfer in REST (Explained by Example)
One of the most critical properties of the REST Architecture (Representational State Transfer) is that it is stateless and the state gets transferred between the client and the server. I personally always found this to be confusing until I really learned architecture by actually using it. In this video, I will explain the state transfer in REST by example.
In a stateful architecture, the client makes a request to the server and the server “remembers” the client. The next request from the client will be retrieved from the state stored locally in the server. The pros of this are the server will pick up where they left off with each request, so request throughput is higher in stateful architecture. Another advantage of the client can send less data through the wire too. The cons of this arc...
published: 25 Nov 2018
-
What Is REST? | Scott Duffy
What is REST? A 5-minute overview of Representative State Transfer (REST) services and RESTful services.
Please like the video, subscribe to see more, and leave a comment if there's anything I can cover in the architecture field!
Check out my site at https://getcloudskills.com/ or subscribe for more videos like this! Follow me on Twitter https://twitter.com/scottjduffy and LinkedIn https://linkedin.com/in/scottjduffy .
An introduction to me and this channel is here: https://youtu.be/T7x_VDZvssc
The best coupon links to my courses, including my popular AZ-900, DP-900, AI-900, AZ-700, SC-900, SC-300, AI-102, DP-100, DP-300, AZ-305, AZ-104 and AZ-204 courses are available on my website:
https://getcloudskills.com/
If you'd like to be notified when there are new courses, blog articles, n...
published: 17 Oct 2015
-
What is a REST API?
What is a REST API? This short video explains it in 6 minutes.
Learn to build REST APIs with Node.js and Express: https://youtu.be/pKd0Rpw7O48
Node.js tutorial for beginners: https://youtu.be/TlB_eWDSMt4
👍Subscribe for more tutorials like this: https://goo.gl/6PYaGF
Want to learn more from me?
Courses: https://codewithmosh.com
Twitter: https://twitter.com/moshhamedani
Facebook: https://www.facebook.com/programmingwithmosh/
Blog: http://programmingwithmosh.com
published: 20 Jan 2018
-
REST API - Introducing REST
REST API Introducing REST
watch more videos at
https://www.tutorialspoint.com/videotutorials/index.htm
Lecture By: Mr. Ravikiran S, Tutorials Point India Private Limited
published: 07 May 2018
-
Representational State Transfer (REST) architectural style | IoT tutorial | part 15
#iot #iottutorial #rest
Learn about REST architectural style its constraints and properties.
-------------------------
*** For notes, you can join gold membership. ***
--------------------------------
If you find this video and notes helpful then do subscribe my channel for more such videos.
---------------------------------------
Do like, share and subscribe to my new channel.
My dance video :
https://www.youtube.com/watch?v=lqvmT6p6svI
Follow me on instagram : https://www.instagram.com/tech.classes/
Follow me on facebook : https://www.facebook.com/techclassespython
published: 13 Dec 2020
-
CC24: Representational state transfer (REST) | REST in Cloud Computing
Cloud Computing Notes: https://imojo.in/9ab06e
Cloud Computing E-Book: https://imojo.in/364zahd
Download Handwritten Notes of all subjects by the following link:
https://www.instamojo.com/universityacademy
Join our official Telegram Channel by the Following Link:
https://t.me/universityacademy
Join Official WhatsApp Group by Link: https://chat.whatsapp.com/F9XFi6QYFYOGA9JGw4gc1o
Topics: Introduction, Cloud Enabling Technologies, Cloud Architecture, Services and Storage, Resource Management and Security in Cloud, Cloud Technologies and Advancements
Faculty: Arti Ranjan
University Academy is India’s first and largest platform for professional students of various streams that were started in 2017. University Academy comprises of a committed band of highly experienced faculties from variou...
published: 01 Nov 2020
-
What is REST architecture?
In this video we'll discuss what REST architecture is and how it works. We would also see some pain-points of REST and a possible solution to it. Let's see.
------------
Don't forget to subscribe and like the video if you enjoyed :)
Be a damner, join the coding community: https://codedamn.com
published: 02 Nov 2019
-
What is REST?
If you have used any modern website, then chances are you have interacted with a website that uses REST. Even YouTube uses RESTful URLs on its site, but what exactly is REST? For starters, REST stands for Representation State Transfer and is just a fancy way of saying that a server responds to create, read, update, and delete requests in a standard way. The idea behind REST is to treat all server URLs as access points for the various resources on the server. For example in this URL, http://example.com/users, users represents the resource that the server is exposing. As mentioned earlier, REST needs a way to create, read, update, and delete these resources and it does so with the following five URLs.
http://example.com/users
http://example.com/users
http://example.com/users/1
http://example...
published: 02 Apr 2019
13:14
Understanding State Transfer in REST (Explained by Example)
One of the most critical properties of the REST Architecture (Representational State Transfer) is that it is stateless and the state gets transferred between th...
One of the most critical properties of the REST Architecture (Representational State Transfer) is that it is stateless and the state gets transferred between the client and the server. I personally always found this to be confusing until I really learned architecture by actually using it. In this video, I will explain the state transfer in REST by example.
In a stateful architecture, the client makes a request to the server and the server “remembers” the client. The next request from the client will be retrieved from the state stored locally in the server. The pros of this are the server will pick up where they left off with each request, so request throughput is higher in stateful architecture. Another advantage of the client can send less data through the wire too. The cons of this architecture are if the server is down, the request cannot be fulfilled and the client is forced to disconnect and reconnect again to another server anyway and go through the entire process.
However, REST is a stateless architecture where every request is responsible to “bring” as much information about the client as possible for the server to reconstruct the state from scratch. This mean that no matter what server the client hit, the request will always be fulfilled so you get higher availability. This is where the state transfer in REST came from. Disadvantages of this architecture is the client now sends more information through the wire, thus your application consumes more bandwidth as a result, this is less of an issue with the introduction of protocol buffers and HTTP2. Another disadvantage is the throughput goes down since each request has to wait for the state to “replay” and get constructed.
Hope you guys enjoy the video
Checkout the other content of this channel
www.husseinnasser.com/softwareengineering
Hussein Nasser
https://wn.com/Understanding_State_Transfer_In_Rest_(Explained_By_Example)
One of the most critical properties of the REST Architecture (Representational State Transfer) is that it is stateless and the state gets transferred between the client and the server. I personally always found this to be confusing until I really learned architecture by actually using it. In this video, I will explain the state transfer in REST by example.
In a stateful architecture, the client makes a request to the server and the server “remembers” the client. The next request from the client will be retrieved from the state stored locally in the server. The pros of this are the server will pick up where they left off with each request, so request throughput is higher in stateful architecture. Another advantage of the client can send less data through the wire too. The cons of this architecture are if the server is down, the request cannot be fulfilled and the client is forced to disconnect and reconnect again to another server anyway and go through the entire process.
However, REST is a stateless architecture where every request is responsible to “bring” as much information about the client as possible for the server to reconstruct the state from scratch. This mean that no matter what server the client hit, the request will always be fulfilled so you get higher availability. This is where the state transfer in REST came from. Disadvantages of this architecture is the client now sends more information through the wire, thus your application consumes more bandwidth as a result, this is less of an issue with the introduction of protocol buffers and HTTP2. Another disadvantage is the throughput goes down since each request has to wait for the state to “replay” and get constructed.
Hope you guys enjoy the video
Checkout the other content of this channel
www.husseinnasser.com/softwareengineering
Hussein Nasser
- published: 25 Nov 2018
- views: 19074
5:41
What Is REST? | Scott Duffy
What is REST? A 5-minute overview of Representative State Transfer (REST) services and RESTful services.
Please like the video, subscribe to see more, and lea...
What is REST? A 5-minute overview of Representative State Transfer (REST) services and RESTful services.
Please like the video, subscribe to see more, and leave a comment if there's anything I can cover in the architecture field!
Check out my site at https://getcloudskills.com/ or subscribe for more videos like this! Follow me on Twitter https://twitter.com/scottjduffy and LinkedIn https://linkedin.com/in/scottjduffy .
An introduction to me and this channel is here: https://youtu.be/T7x_VDZvssc
The best coupon links to my courses, including my popular AZ-900, DP-900, AI-900, AZ-700, SC-900, SC-300, AI-102, DP-100, DP-300, AZ-305, AZ-104 and AZ-204 courses are available on my website:
https://getcloudskills.com/
If you'd like to be notified when there are new courses, blog articles, news or tips relating to Microsoft Azure, I'd love to have you on my list. I promise not to email too much. You can sign up here. https://softwarearchitectca.activehosted.com/f/13
https://wn.com/What_Is_Rest_|_Scott_Duffy
What is REST? A 5-minute overview of Representative State Transfer (REST) services and RESTful services.
Please like the video, subscribe to see more, and leave a comment if there's anything I can cover in the architecture field!
Check out my site at https://getcloudskills.com/ or subscribe for more videos like this! Follow me on Twitter https://twitter.com/scottjduffy and LinkedIn https://linkedin.com/in/scottjduffy .
An introduction to me and this channel is here: https://youtu.be/T7x_VDZvssc
The best coupon links to my courses, including my popular AZ-900, DP-900, AI-900, AZ-700, SC-900, SC-300, AI-102, DP-100, DP-300, AZ-305, AZ-104 and AZ-204 courses are available on my website:
https://getcloudskills.com/
If you'd like to be notified when there are new courses, blog articles, news or tips relating to Microsoft Azure, I'd love to have you on my list. I promise not to email too much. You can sign up here. https://softwarearchitectca.activehosted.com/f/13
- published: 17 Oct 2015
- views: 79982
6:05
What is a REST API?
What is a REST API? This short video explains it in 6 minutes.
Learn to build REST APIs with Node.js and Express: https://youtu.be/pKd0Rpw7O48
Node.js tutorial...
What is a REST API? This short video explains it in 6 minutes.
Learn to build REST APIs with Node.js and Express: https://youtu.be/pKd0Rpw7O48
Node.js tutorial for beginners: https://youtu.be/TlB_eWDSMt4
👍Subscribe for more tutorials like this: https://goo.gl/6PYaGF
Want to learn more from me?
Courses: https://codewithmosh.com
Twitter: https://twitter.com/moshhamedani
Facebook: https://www.facebook.com/programmingwithmosh/
Blog: http://programmingwithmosh.com
https://wn.com/What_Is_A_Rest_Api
What is a REST API? This short video explains it in 6 minutes.
Learn to build REST APIs with Node.js and Express: https://youtu.be/pKd0Rpw7O48
Node.js tutorial for beginners: https://youtu.be/TlB_eWDSMt4
👍Subscribe for more tutorials like this: https://goo.gl/6PYaGF
Want to learn more from me?
Courses: https://codewithmosh.com
Twitter: https://twitter.com/moshhamedani
Facebook: https://www.facebook.com/programmingwithmosh/
Blog: http://programmingwithmosh.com
- published: 20 Jan 2018
- views: 721252
7:28
REST API - Introducing REST
REST API Introducing REST
watch more videos at
https://www.tutorialspoint.com/videotutorials/index.htm
Lecture By: Mr. Ravikiran S, Tutorials Point India Priv...
REST API Introducing REST
watch more videos at
https://www.tutorialspoint.com/videotutorials/index.htm
Lecture By: Mr. Ravikiran S, Tutorials Point India Private Limited
https://wn.com/Rest_Api_Introducing_Rest
REST API Introducing REST
watch more videos at
https://www.tutorialspoint.com/videotutorials/index.htm
Lecture By: Mr. Ravikiran S, Tutorials Point India Private Limited
- published: 07 May 2018
- views: 135362
8:27
Representational State Transfer (REST) architectural style | IoT tutorial | part 15
#iot #iottutorial #rest
Learn about REST architectural style its constraints and properties.
-------------------------
*** For notes, you can join gold membersh...
#iot #iottutorial #rest
Learn about REST architectural style its constraints and properties.
-------------------------
*** For notes, you can join gold membership. ***
--------------------------------
If you find this video and notes helpful then do subscribe my channel for more such videos.
---------------------------------------
Do like, share and subscribe to my new channel.
My dance video :
https://www.youtube.com/watch?v=lqvmT6p6svI
Follow me on instagram : https://www.instagram.com/tech.classes/
Follow me on facebook : https://www.facebook.com/techclassespython
https://wn.com/Representational_State_Transfer_(Rest)_Architectural_Style_|_Iot_Tutorial_|_Part_15
#iot #iottutorial #rest
Learn about REST architectural style its constraints and properties.
-------------------------
*** For notes, you can join gold membership. ***
--------------------------------
If you find this video and notes helpful then do subscribe my channel for more such videos.
---------------------------------------
Do like, share and subscribe to my new channel.
My dance video :
https://www.youtube.com/watch?v=lqvmT6p6svI
Follow me on instagram : https://www.instagram.com/tech.classes/
Follow me on facebook : https://www.facebook.com/techclassespython
- published: 13 Dec 2020
- views: 7031
12:55
CC24: Representational state transfer (REST) | REST in Cloud Computing
Cloud Computing Notes: https://imojo.in/9ab06e
Cloud Computing E-Book: https://imojo.in/364zahd
Download Handwritten Notes of all subjects by the following li...
Cloud Computing Notes: https://imojo.in/9ab06e
Cloud Computing E-Book: https://imojo.in/364zahd
Download Handwritten Notes of all subjects by the following link:
https://www.instamojo.com/universityacademy
Join our official Telegram Channel by the Following Link:
https://t.me/universityacademy
Join Official WhatsApp Group by Link: https://chat.whatsapp.com/F9XFi6QYFYOGA9JGw4gc1o
Topics: Introduction, Cloud Enabling Technologies, Cloud Architecture, Services and Storage, Resource Management and Security in Cloud, Cloud Technologies and Advancements
Faculty: Arti Ranjan
University Academy is India’s first and largest platform for professional students of various streams that were started in 2017. University Academy comprises of a committed band of highly experienced faculties from various top universities or colleges of India.
……………………………………………………………………………………………………………………………………………………………
#CloudComputing #ArtiRanjan #EngineeringSubjects #OnlineCourses #AcademicSubject
……………………………………………………………………………………………………………………………………………………………
This channel is providing the complete lecture series of following Subjects/Programming Languages.
First Year:
Programming For Problem Solving: https://bit.ly/2kAISFl
C Programming For Beginners: http://bit.ly/2m8X2hs
Basic Electrical Engineering: http://bit.ly/2mD61rv
Second Year:
Data Structure: https://qrgo.page.link/1RVYU
Theory of Automata and Formal Language: http://bit.ly/2mvtrPl
Operating System Tutorial in Hindi: http://bit.ly/2maMzC6
Python Programming A Practical Approach: http://bit.ly/2l55OwE
Third Year:
Design and Analysis of Algorithms (DAA) in Hindi: https://bit.ly/2m8mtQk
Compiler Design: https://bit.ly/2mCPELy
Principle of Programming Language: https://bit.ly/2mDtbhz
Web Technology In Hindi: http://bit.ly/2l7li3d
Data Warehousing and Data Mining in Hindi: http://bit.ly/2muAtUu
Database Management System: http://bit.ly/2mg1z1t
Cyber Security Tutorial In Hindi: http://bit.ly/2kEq743
Fourth Year:
Distributed System Tutorial In Hindi: http://bit.ly/2mdxaRK
Cloud Computing : https://qrgo.page.link/nVUFt
Programming Course
Android App Development: http://bit.ly/2l54yd3
C Programming: Practical Approach in Hindi: http://bit.ly/2muDpjY
JavaScript in Hindi: http://bit.ly/2maIjCN
Java Programming in Hindi: http://bit.ly/2m9mNOE
JFLAP/TAFL Lab (Theory of Automata Lab): http://bit.ly/2kVoy1T
Tech News: http://bit.ly/2kBxEk5
Other: http://bit.ly/2mekKsw
My Gadgets for Video Recording
My TV: https://amzn.to/3acqasf
My Mic: https://amzn.to/2Z2o8X0
My Laptop: https://amzn.to/2sN6biR
My Tripod: https://amzn.to/36Jvhhw
My Mobile Cum Camera: https://amzn.to/35HVAVh
My Earphone: https://amzn.to/3anMm3n
My Smart Watch: https://amzn.to/2SppVnP
My Lighting Set: https://amzn.to/2riY8tS
My White Board: https://amzn.to/373Nh6a
White Board Marker & Duster: https://amzn.to/2sYb2Oh
-------------------------------------------------------------------------------------------------------------
Regards
University Academy
WhatsApp: +91-9311825328
Email:
[email protected]
Website:
https://www.universityacademy.in
https://www.universityacademy.co.in
YouTube:
https://www.youtube.com/c/UniversityAcademy
Facebook:
https://www.facebook.com/UniversityAcademyOfficial
Twitter
https://twitter.com/UniAcadofficial
Instagram
https://www.instagram.com/universityacademyofficial
Google+:
https://plus.google.com/+UniversityAcademy
https://wn.com/Cc24_Representational_State_Transfer_(Rest)_|_Rest_In_Cloud_Computing
Cloud Computing Notes: https://imojo.in/9ab06e
Cloud Computing E-Book: https://imojo.in/364zahd
Download Handwritten Notes of all subjects by the following link:
https://www.instamojo.com/universityacademy
Join our official Telegram Channel by the Following Link:
https://t.me/universityacademy
Join Official WhatsApp Group by Link: https://chat.whatsapp.com/F9XFi6QYFYOGA9JGw4gc1o
Topics: Introduction, Cloud Enabling Technologies, Cloud Architecture, Services and Storage, Resource Management and Security in Cloud, Cloud Technologies and Advancements
Faculty: Arti Ranjan
University Academy is India’s first and largest platform for professional students of various streams that were started in 2017. University Academy comprises of a committed band of highly experienced faculties from various top universities or colleges of India.
……………………………………………………………………………………………………………………………………………………………
#CloudComputing #ArtiRanjan #EngineeringSubjects #OnlineCourses #AcademicSubject
……………………………………………………………………………………………………………………………………………………………
This channel is providing the complete lecture series of following Subjects/Programming Languages.
First Year:
Programming For Problem Solving: https://bit.ly/2kAISFl
C Programming For Beginners: http://bit.ly/2m8X2hs
Basic Electrical Engineering: http://bit.ly/2mD61rv
Second Year:
Data Structure: https://qrgo.page.link/1RVYU
Theory of Automata and Formal Language: http://bit.ly/2mvtrPl
Operating System Tutorial in Hindi: http://bit.ly/2maMzC6
Python Programming A Practical Approach: http://bit.ly/2l55OwE
Third Year:
Design and Analysis of Algorithms (DAA) in Hindi: https://bit.ly/2m8mtQk
Compiler Design: https://bit.ly/2mCPELy
Principle of Programming Language: https://bit.ly/2mDtbhz
Web Technology In Hindi: http://bit.ly/2l7li3d
Data Warehousing and Data Mining in Hindi: http://bit.ly/2muAtUu
Database Management System: http://bit.ly/2mg1z1t
Cyber Security Tutorial In Hindi: http://bit.ly/2kEq743
Fourth Year:
Distributed System Tutorial In Hindi: http://bit.ly/2mdxaRK
Cloud Computing : https://qrgo.page.link/nVUFt
Programming Course
Android App Development: http://bit.ly/2l54yd3
C Programming: Practical Approach in Hindi: http://bit.ly/2muDpjY
JavaScript in Hindi: http://bit.ly/2maIjCN
Java Programming in Hindi: http://bit.ly/2m9mNOE
JFLAP/TAFL Lab (Theory of Automata Lab): http://bit.ly/2kVoy1T
Tech News: http://bit.ly/2kBxEk5
Other: http://bit.ly/2mekKsw
My Gadgets for Video Recording
My TV: https://amzn.to/3acqasf
My Mic: https://amzn.to/2Z2o8X0
My Laptop: https://amzn.to/2sN6biR
My Tripod: https://amzn.to/36Jvhhw
My Mobile Cum Camera: https://amzn.to/35HVAVh
My Earphone: https://amzn.to/3anMm3n
My Smart Watch: https://amzn.to/2SppVnP
My Lighting Set: https://amzn.to/2riY8tS
My White Board: https://amzn.to/373Nh6a
White Board Marker & Duster: https://amzn.to/2sYb2Oh
-------------------------------------------------------------------------------------------------------------
Regards
University Academy
WhatsApp: +91-9311825328
Email:
[email protected]
Website:
https://www.universityacademy.in
https://www.universityacademy.co.in
YouTube:
https://www.youtube.com/c/UniversityAcademy
Facebook:
https://www.facebook.com/UniversityAcademyOfficial
Twitter
https://twitter.com/UniAcadofficial
Instagram
https://www.instagram.com/universityacademyofficial
Google+:
https://plus.google.com/+UniversityAcademy
- published: 01 Nov 2020
- views: 15813
6:18
What is REST architecture?
In this video we'll discuss what REST architecture is and how it works. We would also see some pain-points of REST and a possible solution to it. Let's see.
--...
In this video we'll discuss what REST architecture is and how it works. We would also see some pain-points of REST and a possible solution to it. Let's see.
------------
Don't forget to subscribe and like the video if you enjoyed :)
Be a damner, join the coding community: https://codedamn.com
https://wn.com/What_Is_Rest_Architecture
In this video we'll discuss what REST architecture is and how it works. We would also see some pain-points of REST and a possible solution to it. Let's see.
------------
Don't forget to subscribe and like the video if you enjoyed :)
Be a damner, join the coding community: https://codedamn.com
- published: 02 Nov 2019
- views: 8510
3:24
What is REST?
If you have used any modern website, then chances are you have interacted with a website that uses REST. Even YouTube uses RESTful URLs on its site, but what ex...
If you have used any modern website, then chances are you have interacted with a website that uses REST. Even YouTube uses RESTful URLs on its site, but what exactly is REST? For starters, REST stands for Representation State Transfer and is just a fancy way of saying that a server responds to create, read, update, and delete requests in a standard way. The idea behind REST is to treat all server URLs as access points for the various resources on the server. For example in this URL, http://example.com/users, users represents the resource that the server is exposing. As mentioned earlier, REST needs a way to create, read, update, and delete these resources and it does so with the following five URLs.
http://example.com/users
http://example.com/users
http://example.com/users/1
http://example.com/users/1
http://example.com/users/1
The first two URLs do not have an ID so they act on the entire user's resource, while the last three URLs do have an ID in their URL and thus act on only a single user resource, but as you may notice there are only two distinct URLs. That is because REST uses the four basic HTTP actions, GET, POST, PUT, and DELETE to determine what to do with each URL. If we add in those actions to the URLs it is much easier to see what each of the URLs do.
[GET] http://example.com/users
[POST] http://example.com/users
[GET] http://example.com/users/1
[PUT] http://example.com/users/1
[DELETE] http://example.com/users/1
The first URL we have is the GET users URL, and it is used to get a list of all users. In REST when a GET URL does not have an ID it acts upon the entire resource and will always return a list of every item in that resource. The GET action in REST corresponds with reading data.
The second URL, which is almost identical to the first, is used to create a new user. In REST the POST action corresponds with creation, and should always be used on the entire resource by not using an ID in the URL.
The third URL is another GET URL, but this URL is for getting only a single user based on the id that is in the URL. The ID portion of the URL is used by REST to determine which resource from the collection of resources it should act upon. In the case of this URL it is used to return the user with that ID.
The fourth URL is the most confusing of them all, but it is used to update a user with the given ID. The PUT action in REST corresponds with update and works very similarly to POST, but instead of creating a new resource it updates an existing resource.
Lastly, we have the most straight forward URL of them all which is for deleting a user with a specific ID. The DELETE action in REST does exactly what you would think and deletes the resource with the given ID.
In order for a website to use REST, the URLs do not need to be formatted exactly the same as above. For example using these URLs would still be considered RESTful, but most applications will use the previously mentioned URLs.
[GET] http://example.com/users
[POST] http://example.com/users
[GET] http://example.com/users/details/1
[PUT] http://example.com/users/update/1
[DELETE] http://example.com/users/delete/1
The only thing that matters with REST is that the URLs used represent a resource, in this case a user, and that they support creating, reading, updating, and deleting from that resource using the HTTP actions GET, POST, PUT, and DELETE.
Previous Video:
https://youtu.be/4r6WdaY3SOA
Next Video:
https://youtu.be/DUg2SWWK18I
Playlist:
https://www.youtube.com/playlist?list=PLZlA0Gpn_vH8jbFkBjOuFjhxANC63OmXM
Twitter:
https://twitter.com/DevSimplified
GitHub:
https://github.com/WebDevSimplified
CodePen:
https://codepen.io/WebDevSimplified
#REST #WebDevelopment #RESTful
https://wn.com/What_Is_Rest
If you have used any modern website, then chances are you have interacted with a website that uses REST. Even YouTube uses RESTful URLs on its site, but what exactly is REST? For starters, REST stands for Representation State Transfer and is just a fancy way of saying that a server responds to create, read, update, and delete requests in a standard way. The idea behind REST is to treat all server URLs as access points for the various resources on the server. For example in this URL, http://example.com/users, users represents the resource that the server is exposing. As mentioned earlier, REST needs a way to create, read, update, and delete these resources and it does so with the following five URLs.
http://example.com/users
http://example.com/users
http://example.com/users/1
http://example.com/users/1
http://example.com/users/1
The first two URLs do not have an ID so they act on the entire user's resource, while the last three URLs do have an ID in their URL and thus act on only a single user resource, but as you may notice there are only two distinct URLs. That is because REST uses the four basic HTTP actions, GET, POST, PUT, and DELETE to determine what to do with each URL. If we add in those actions to the URLs it is much easier to see what each of the URLs do.
[GET] http://example.com/users
[POST] http://example.com/users
[GET] http://example.com/users/1
[PUT] http://example.com/users/1
[DELETE] http://example.com/users/1
The first URL we have is the GET users URL, and it is used to get a list of all users. In REST when a GET URL does not have an ID it acts upon the entire resource and will always return a list of every item in that resource. The GET action in REST corresponds with reading data.
The second URL, which is almost identical to the first, is used to create a new user. In REST the POST action corresponds with creation, and should always be used on the entire resource by not using an ID in the URL.
The third URL is another GET URL, but this URL is for getting only a single user based on the id that is in the URL. The ID portion of the URL is used by REST to determine which resource from the collection of resources it should act upon. In the case of this URL it is used to return the user with that ID.
The fourth URL is the most confusing of them all, but it is used to update a user with the given ID. The PUT action in REST corresponds with update and works very similarly to POST, but instead of creating a new resource it updates an existing resource.
Lastly, we have the most straight forward URL of them all which is for deleting a user with a specific ID. The DELETE action in REST does exactly what you would think and deletes the resource with the given ID.
In order for a website to use REST, the URLs do not need to be formatted exactly the same as above. For example using these URLs would still be considered RESTful, but most applications will use the previously mentioned URLs.
[GET] http://example.com/users
[POST] http://example.com/users
[GET] http://example.com/users/details/1
[PUT] http://example.com/users/update/1
[DELETE] http://example.com/users/delete/1
The only thing that matters with REST is that the URLs used represent a resource, in this case a user, and that they support creating, reading, updating, and deleting from that resource using the HTTP actions GET, POST, PUT, and DELETE.
Previous Video:
https://youtu.be/4r6WdaY3SOA
Next Video:
https://youtu.be/DUg2SWWK18I
Playlist:
https://www.youtube.com/playlist?list=PLZlA0Gpn_vH8jbFkBjOuFjhxANC63OmXM
Twitter:
https://twitter.com/DevSimplified
GitHub:
https://github.com/WebDevSimplified
CodePen:
https://codepen.io/WebDevSimplified
#REST #WebDevelopment #RESTful
- published: 02 Apr 2019
- views: 197558