- HTML - Hyper Text Markup Language
- CSS - Cascading Style Sheets
-
REpresentational State Transfer
-
Architectural pattern for developing HTTP APIs.
-
REST provides a standardized way to interact with HTTP based APIs.
-
A REST url (or endpoint) takes the following shape (or form):
http(s)://domain_name/{resource}
Let's break this down:
http(s)://
indicates the protocoldomain_name
is the domain (for example facebook.com) on which the resource exists.resource
is the thing that the API exposes. For example, inhttps://facebook.com/users
,users
is the resource.
-
Convention
-
GET a listing of a resource.
GET {domain_name}/{resource}
This will give us the list of users
GET https://facebook.com/users
-
POST - Create a new resource.
POST
is used to create a new entry.{domain_name}/{resource}
This will create a new user
POST https://facebook.com/users
-
GET a specific resource.
{domain_name}/{resource}/{resource_id}
Ex: This will give us details about a single user with ID
1
GET https://facebook.com/users/1
-
PUT edits a resource. PUT is used to modify / update the details of a specific resource
PUT http(s)://{domain_name}/{resource}/{resource_id}
Ex: This will update the details of the user with ID
1
PUT http(s)://facebook.com/users/1`
-
-
Nested resources - A nested resource is something like posts and comments. A post can have many comments (think Facebook). We follow the following convention for nested resources:
http(s)://{domain_name}/{resource}/{resource_id}/{sub_resource}
Ex: This will give us all the comments
that are under posts
with ID 1
http(s)://facebook.com/posts/1/comments
Write the HTTP Method and URL for getting a list of posts from facebook.
// TODO
Write the HTTP Method and URL for fetching details of single post
// TODO
- GET all comments for a specific post
// TODO
- POST a new comment for a post
// TODO
- GET a specific comment for a post
// TODO
- Original scripting shell was called Bourne Shell (sh), created by Stephen Bourne
- Bash is an improvement over sh - Bourne Again
- Bash is used to run commands on the terminal / command line