UCONN

UCONN
UCONN

HTTP Explained

What is HTTP?

HTTP is a protocol which allows the fetching of resources, such as HTML documents.

Foundation of any data exchange on the Web and it is a client-server protocol.

Clients and servers communicate by exchanging individual messages .

Messages sent by the client are called requests.

Messages sent by the server as an answer are called responses.

Application layer protocol that is sent over TCP,  or over a TLS-encrypted TCP connection.

Transport Layer Security, or TLS, is a widely adopted security protocol designed to facilitate privacy and data security for communications over the Internet. A primary use case of TLS is encrypting the communication between web applications and servers, such as web browsers loading a website.

Not only fetch hypertext documents, but also images and videos or to post

content to servers, like with HTML form results. 


The Transmission Control Protocol (TCP) is one of the main protocols

of the Internet protocol suite. 


Network implementation in which it complemented the Internet Protocol (IP). TCP/IP. 

TCP provides reliable, ordered, and error-checked delivery of a stream

of octets (bytes) between applications running on hosts communicating

via an IP network.


Internet applications (World Wide Web, email, remote administration, and

file transfer) rely on TCP, which is part of the Transport Layer of the

TCP/IP suite. SSL/TLS often runs on top of TCP.


https://developer.mozilla.org/en-US/docs/Web/HTTP/Overview


A Google Cloud Function can be called in response to multiple types of

events, and of the most useful events to use is an HTTP request

Make a GET, POST or other HTTP request to a URL provided by your

Cloud Function, and have it run in response to the given request.

HyperText Transfer Protocol (HTTP)

HTTP is an asymmetric request-response client-server protocol.

Sends a request message to an HTTP server. 

Returns a response message.  

Browser

Issue a URL from your browser to get a web resource using HTTP,

Browser turns the URL into a request message 

Send it to the HTTP server. 

Server interprets the request message.

Returns you an appropriate response message.









Uniform Resource Locator (URL)

A URL (Uniform Resource Locator) is used to uniquely identify a resource

over the web.

URL has the following syntax:

protocol://hostname:port/path-and-file-name

There are 4 parts in a URL:

  1. Protocol: The application-level protocol used by the client and server,e.g., HTTP, FTP, and telnet.

  2. Hostname: The DNS domain name (e.g., www.nowhere123.com)

or IP address (e.g., 192.128.1.2) of the server.

  1. Port: The TCP port number that the server is listening for incoming

requests from the clients.

  1. Path-and-file-name: The name and location of the requested

resource, under the server document base directory.

The port number was not specified in the URL, and takes on the default

number, which is TCP port 80 for HTTP. The path and file name for the

resource to be located

is "/docs/index.html".

Other examples of URL are:

ftp://www.ftp.org/docs/test.txt

mailto:user@test101.com

news:soc.culture.Singapore

telnet://www.nowhere123.com/



HTTP Protocol

URL in the address box of the browser.

Translates the URL into a request message.

GET /docs/index.html HTTP/1.1

Host: www.nowhere123.com

Accept: image/gif, image/jpeg, */*

Accept-Language: en-us

Accept-Encoding: gzip, deflate

User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)

(blank line)

When this request message reaches the server, the server can take either

one of these actions:

The server interprets the request received, maps the request into a file under

the server's document directory, and returns the file requested to

 the client.

The server interprets the request received, maps the request into a program

kept in the server, executes the program, and returns the

 output of the program to the client.


The request cannot be satisfied, the server returns an error message.

An example of the HTTP response message is as shown:

HTTP/1.1 200 OK

Date: Sun, 18 Oct 2009 08:56:53 GMT

Server: Apache/2.2.14 (Win32)

Last-Modified: Sat, 20 Nov 2004 07:16:26 GMT

ETag: "10000000565a5-2c-3e94b66c2e680"

Accept-Ranges: bytes

Content-Length: 44

Connection: close

Content-Type: text/html

X-Pad: avoid browser bug

  


No comments:

Post a Comment

Assignment#1 due 9/10/25

 Assignment#1 due 9/10/25 https://uconnstamfordslp.blogspot.com/p/linux-explained.html Note validate major for this list -  make sure you se...