What is TCP?
= Transmission Control Protocol (is connection oriented )
What does the TCP do?
Establishes a point-to-point connection between two entities in the network
What is the IP?
= Internet protocol (principal communications protocol on the internet)
What does the IP do?
Delivers packets of data across network boundaries
What is the IP Address?
numerical label assigned to devices in a network that use the internet protocol to communicate with other devices
What is the DNS?
= Domain Name System
What does the DNS do?
It translates hostnames to IP Addresses
What does HTTP stand for?
Hyper Text Transfer Protocol
What is HTTP built upon?
TCP and IP
What is a synchronous request-response protocol?
Client (web browser) sends request
Web server replies with appropriate answer (could also be an error)
What does it mean if a protocol is stateless?
Each request-response pair is independent
No permanent connection between server and browser
(allows for a high number of users per server)
What are some properties of HTTP?
It is a:
Synchronous request-response protocol
"Stateless" protocol
Proxies mediate between browser and server
(caching, filtering, etc.)
Everything is sent and received as clear text
What are HTTP Resources?
They are an abstract concept for nodes in hypertext (HTML files, documents, images, etc)
-> Data types are defined by MIME (RFC 2045)
e.g. "text/html", "image/png", “application/xml“, etc.
What is an URL?
= Uniform Resource Locator
Standardized way of identification and addressing of any resource on the internet
Subtype of Uniform Resource Identifier (URI)
What does URL Syntax look like?
<scheme>://[<user>[:<password>]@]<server>[:<port>]/[<path>][?<query>][#<fragment>]
-> https://usr:pwd@tennis-club-wieden.at:3000/members/rackets?year=2020#vintage
What is a Scheme in context of an URL?
It’s a protocol to be used when connecting to a server (http(s), ftp, mongodb, etc.)
What are User/Password used for in context of an URL and are they needed?
They’re optional:
Credentials to access a protected resource
How is the Server represented in context of an URL?
As the Domain name or IP address of the server
What is the Port in context of an URL?
It’s the port at which the server is listening for requests
What is the path in context of the URL?
It’s the local path to a resource on the server
What is a Query in context of an URL?
Parameters that can be passed to server app
What is a Fragment in context of an URL? What is so special about it?
Name of an entity within the resource
-> This is only used by clients
What does a HTTP Request look like?
Refers to a certain resource (identified by its URL)
Contains a certain type/method (Most common methods for access: GET, POST, PUT)
Optional:
Application data = the “body” (e.g., the data of a form (POST, PUT)
Application metadata
Preferred data type and language (for GET, POST - e.g., JSON/ HTML)
Data type of the body (for POST, PUT - what kind of data)
request metadata (headers) (e.g., Targethost, User authentication, Cookies, etc.)
What is a HTTP Request Method?
Each access to a resource has a certain request type ("method")
What does GET do?
request a resource (only retrieves data)
What does POST do?
submit data to a resource
Data is included in body of the request
May result in creation of new resource or update of existing resource
What does PUT do?
replaces target resource with sent payload (Idempotent)
What does DELETE do?
deletes a resource (Idempotent)
What does PATCH do?
provides a set of instructions to modify the target resource
What do OPTIONS, TRACE, HEAD, CONNECT do?
access to the metadata of the servers, the Internet connection, the resource, etc.
What are potential MIME Types?
text/plain
text/html
image/jpeg
application/pdf
application/xml
What does the HTTP Request Header “Accept” do?
what kind of response type to accept (e.g. Accept: application/json)
What does the HTTP Request Header “Content-Type” do?
what kind of request payload are we sending (in POST and PUT)
What does the HTTP Request Header “Accept-Encoding” do?
tells server a list of acceptable encodings (e.g. Accept-Encoding: gzip, deflate)
What does the HTTP Request Header “Authorization” do?
Authorization method and credentials (e.g. Authorization: Basic QWxhZGRpbjpPcGVuU2VzYW1l)
What does the HTTP Request Header “Cookie” do?
Sends a cookie to the server
HTTP Request Example:
What are fixed properties of a HTTP Response?
Always follows a request message
Contains a status code
What are optional properties of an HTTP Response?
application data („body“)
application metadata
Data type and encoding of the application data
Caching possibilities and expiring date
Current URL of a transferred resource (for GET)
response metadata (e.g.: Server, TCP connection state, date)
What are the 5 different HTTP Response Statuses?
HTTP Response Headers - Example
HTTP Response Example
Zuletzt geändertvor 2 Jahren