questions6 Flashcards
HTTP(Hyper Text Transfer Protocol)
Hyper Text Transfer Protocol, the most common protocol for communication between multiple applications.
Parts of the message of HTTP:
* startline - includes HTTP method, request-target(URL), HTTP version
* headers(optional) - describe the request or the body included in the message
* body(optional) - contains data associated with request
HTTP (Hyper Text Transport Protocol) methods
- GET - should only get data
- POST - usually is using for creating entity or submitting data
- PUT - usually replaces the whole entity with a whole body
- DELETE - deletes the specified entity
- PATCH - usually applies partial updates to entity
_____
(for CORS(cross origin requests) preflight request) - is a set of rules that not allowed you to ask the server for the information for example domain. - OPTIONS
- HEAD
- CONNECT
- TRACE
What kinds of transports do you know in js?
- HTTP
- WebSockets - permanent channel between two applications for example back end and front end, where both are listening for updates or notifications from each other.
REST API(Abstract program interface)
API - Abstract program interface. REST API is an architectural approach for back-end API.
We are creating endpoints /collection/id
the collection is usually plurals
id is pointing to the current entity with this id.
We are using HTTP method as intended.
back-end API
is a programming interface that helps developers to interact with back-end services for example server.