-
- URI: Uniform Resource Indentifier
- URL: Uniform Resource Locator
- URN: Uniform Resource Name All these are technical jargons ; they have the same meaning that is address/location of that site
-
- http Methods and headers
- Http: Hyper Text Transfer Protocol
- inexpensive way of communication or transfering data
- http vs https : both work on the same principle
- https add one more layer to it : the data in the route is encoded (not readable)
- Conecpt of O.S , Network and cryptography
when http request is sent some info is also sent along with file and all that is Meta data :-
- eg Like in file Meta data :name , size , createdby , modify
- Meta data is a key value pair
- Use case
- caching
- authentication : sesion / refresh token
- manage state : eg guest / loggedin to access cart in ecommerce website
- (x - prefix) before 2012 convention
No standard category , can vary on the book or tutor
- Request Headers: from client
- Response Headers: from server
- Representation Headers: encoding / compression
- as there is Network limit : so we have to ensure no lag , so encode
- Mobile app , zip , graph chart
- razorpay : security
- Payload Headers: data
- id , email
- Accept : what data to be accepted ; most common application form or json or html/text
- User Agent : request from which website knows it is running on which browser , its engine support ,
- you may get a pop up : use our app for better experience
- it is this header that tells the website that it is running or browser
- Authorization : frontend
- bearer keyword
- token: JWT
- Content Type: what type png , pdf
- Cookie: time , login details
- Cache: control data expiry
- Access - Control - Allow - Origin
- Access - Control - Allow - Credentials
- Access - Control - Allow - Method
- Cross-Origin-Embedded Policy
- Cross-Origin Opener Policy
- Content Security Policy
- X -XSS - Protection
Basic set of operations that can be used to interact with server ,
- Data to be written in a Db
- Data to be fetched (read)
- update whole or some portion
- GET: retrieve a resource
- eg; give me this user details
- HEAD : No message body(response headers only) ; cache control
- OPTIONS : what operations are available ; asked by the user from server
- TRACE: loopback test ; get some data ; debugging; resource is behind proxy ; timely happening
- PUT : replace a resource
- PATCH : change part of a resource
- POST : interact with a resource (mostly add)
- add new user , add new category
- Thunder Client : vscode extension
- Postman
- 1xx :- Informational
- 2xx :- Success
- 3xx :- Redirection
- temporarily to other resource
- 4xx :- Client Error
- login token not given
- image oversize
- 5xx :-Server Error
- Network break
- congestion ; retry
xx: range from 00 to 99
- 100 : continue
- 102: Proccessing
- wait 3sec ; if task pending
- 200 : OK
- 201 : resouce created
- 307 : temporary redirect
- 308 : Permanent redirect
- 400 : Bad Request
- 401 : unauthorized
- 402 : Payment required
- 404 : Not Found
- 500 : Internal Sever
- 504 : Gateway Time Out