SlideShare a Scribd company logo
1 of 21
HTTP
Submitted To:
Er. Neha Chhabra
Assistant Professor
Computer Science and
Engineering Department
HTTP




HTTP stands for Hypertext Transfer Protocol. It is an
TCP/IP based communication protocol which is used to
deliver virtually all files and other data, collectively
called resources, on the World Wide Web. These
resources could be HTML files, image files, query results,
or anything else.
A browser is works as an HTTP client because it sends
requests to an HTTP server which is called Web server.
The Web Server then sends responses back to the client.
The standard and default port for HTTP servers to listen
on is 80 but it can be changed to any other port like 8080
etc.
There are three important things
about HTTP of which you should be
aware:





HTTP is connectionless: After a request is made, the client disconnects
from the server and waits for a response. The server must re-establish the
connection after it process the request.
HTTP is media independent: Any type of data can be sent by HTTP as
long as both the client and server know how to handle the data content.
HTTP is stateless: This is a direct result of HTTP's being connectionless.
The server and client are aware of each other only during a request.
Afterwards, each forgets the other. For this reason neither the client nor the
browser can retain information between different request across the web
pages.
Following diagram shows where
HTTP Protocol fits in
communication:
HTTP Message Structure
Like most network protocols, HTTP uses the client-server
model: An HTTP client opens a connection and sends a
request message to an HTTP server; the server then returns a
response message, usually containing the resource that was
requested. After delivering the response, the server closes the
connection.
 The format of the request and response messages are
similar and will have following structure:
 An initial line
 Zero or more header lines
 A blank line
 An optional message body like file, query data or query
output.

Initial Line : Request
 The

initial line is different for the request than for the response.
A request line has three parts, separated by spaces:
 An HTTP Method Name
 The local path of the requested resource.
 The version of HTTP being used.
 GET is the most common HTTP method. Other methods could
be POST, HEAD etc.
 The path is the part of the URL after the host name. This path is
also called the request Uniform Resource Identifier (URI). A
URI is like a URL, but more general.
 The
HTTP
version
always
takes
the
form
"HTTP/x.x", uppercase.
EXAMPLE OF Initial Line :
Request
GET /path/to/file/index.html HTTP/1.0
Initial Line : Response
The

initial response line, called the status line,
also has three parts separated by spaces:
 The version of HTTP being used.
 A response status code that gives the result of
the request.
 An English reason phrase describing the status
code.
EXAMPLE of Initial Line :
Response
HTTP/1.0 200 OK
or
HTTP/1.0 404 Not Found
Header Lines








Header lines provide information about the request or response, or about
the object sent in the message body.
The header lines are in the usual text header format, which is: one line per
header, of the form "Header-Name: value". It's the same format used for
email and news postings.
A header line should end in.
The header name is not case-sensitive.
Any number of spaces or tabs may be between the ":" and the value.
Header lines beginning with space or tab are actually part of the previous
header line, folded into multiple lines for easy reading.
EXAMPLE of Header
Lines
User-agent: Mozilla/3.0Gold
Or
Last-Modified: Fri, 31 Dec 1999
23:59:59 GMT
The Message Body
An HTTP message may have a body of data sent after the header
lines. In a response, this is where the requested resource is returned
to the client (the most common use of the message body), or
perhaps explanatory text if there's an error. In a request, this is
where user-entered data or uploaded files are sent to the server.
 If an HTTP message includes a body, there are usually header lines
in the message that describe the body. In particular:
 The Content-Type: Header gives the MIME-type (Multi-purpose
Internet Mail Extensions) of the data in the body, such as text/html
or image/gif.
 The Content-Length: Header gives the number of bytes in the
body.

Request Methods
 HTTP

defines methods (sometimes referred to
as verbs) to indicate the desired action to be
performed on the identified resource.
 The HTTP/1.0 defined the GET, POST and
HEAD methods and the HTTP/1.1 added 5
new
methods:
OPTIONS, PUT, DELETE, TRACE and
CONNECT.
Above Methods are defined
as:






GET : Requests a representation of the specified resource. Requests using
GET should only retrieve data and should have no other effect. (This is
also true of some other HTTP methods). The W3C has published guidance
principles on this distinction, saying, "Web application design should be
informed by the above principles, but also by the relevant limitations." See
safe methods below.
HEAD : Asks for the response identical to the one that would correspond
to a GET request, but without the response body. This is useful for
retrieving meta-information written in response headers, without having to
transport the entire content.
POST :Requests that the server accept the entity enclosed in the request as
a new subordinate of the web resource identified by the URI. The data
posted might be, as examples, an annotation for existing resources; a
message for a bulletin board, newsgroup, mailing list, or comment thread;
a block of data that is the result of submitting a web form to a datahandling process; or an item to add to a database.
Methods (contd.)











PUT : Requests that the enclosed entity be stored under the supplied URI.
If the URI refers to an already existing resource, it is modified; if the URI
does not point to an existing resource, then the server can create the
resource with that URI.
DELETE :Deletes the specified resource.
TRACE : Echoes back the received request so that a client can see what
(if any) changes or additions have been made by intermediate servers.
OPTIONS : Returns the HTTP methods that the server supports for the
specified URL. This can be used to check the functionality of a web server
by requesting '*' instead of a specific resource.
CONNECT : Converts the request connection to a transparent TCP/IP
tunnel, usually to facilitate SSL-encrypted communication (HTTPS)
through an unencrypted HTTP proxy.
PATCH : Is used to apply partial modifications to a resource.
HTTP servers are required to implement at least the GET and HEAD
methods and, whenever possible, also the OPTIONS method.
HTTP Status
Messages
1xx : Information
Message:
100 Continue

Description:

Only a part of the request has been
received by the server, but as long as it
has not been rejected, the client should
continue with the request
101 Switching Protocols The server switches protocol
2xx : Successful
Message:

Description:

200 OK
201 Created

The request is OK
The request is complete, and a new resource is
created
The request is accepted for processing, but the
processing is not complete

202 Accepted

203 Non-authoritative
Information
204 No Content
205 Reset Content
206 Partial Content
5xx : Server Error
Message:
500 Internal Server Error
501 Not Implemented
502 Bad Gateway

503 Service Unavailable
504 Gateway Timeout
505 HTTP Version Not
Supported

Description:
The request was not completed. The server met
an unexpected condition
The request was not completed. The server did
not support the functionality required
The request was not completed. The server
received an invalid response from the upstream
server
The request was not completed. The server is
temporarily overloading or down
The gateway has timed out
The server does not support the "http protocol"
version
ANY
QUERIES?
THANK
YOU
An Effort By :VAIBHAV RAI
6312077

More Related Content

What's hot

What's hot (20)

Http Protocol
Http ProtocolHttp Protocol
Http Protocol
 
Http and its Applications
Http and its ApplicationsHttp and its Applications
Http and its Applications
 
Mail server
Mail serverMail server
Mail server
 
Http-protocol
Http-protocolHttp-protocol
Http-protocol
 
HTTP
HTTPHTTP
HTTP
 
HTTP Presentation
HTTP Presentation HTTP Presentation
HTTP Presentation
 
HyperText Transfer Protocol (HTTP)
HyperText Transfer Protocol (HTTP)HyperText Transfer Protocol (HTTP)
HyperText Transfer Protocol (HTTP)
 
How Internet Works
How Internet WorksHow Internet Works
How Internet Works
 
HTTP & WWW
HTTP & WWWHTTP & WWW
HTTP & WWW
 
Simple Mail Transfer Protocol
Simple Mail Transfer ProtocolSimple Mail Transfer Protocol
Simple Mail Transfer Protocol
 
HTTP request and response
HTTP request and responseHTTP request and response
HTTP request and response
 
Web Servers (ppt)
Web Servers (ppt)Web Servers (ppt)
Web Servers (ppt)
 
Web server
Web serverWeb server
Web server
 
Hypertext Transfer Protocol
Hypertext Transfer ProtocolHypertext Transfer Protocol
Hypertext Transfer Protocol
 
Introduction to HTTP protocol
Introduction to HTTP protocolIntroduction to HTTP protocol
Introduction to HTTP protocol
 
Hypertext Transfer Protocol
Hypertext Transfer ProtocolHypertext Transfer Protocol
Hypertext Transfer Protocol
 
Telnet
TelnetTelnet
Telnet
 
Web Development Course: PHP lecture 1
Web Development Course: PHP lecture 1Web Development Course: PHP lecture 1
Web Development Course: PHP lecture 1
 
WEB HOSTING
WEB HOSTINGWEB HOSTING
WEB HOSTING
 
File Transfer protocols
File Transfer protocolsFile Transfer protocols
File Transfer protocols
 

Viewers also liked

HyperText Transfer Protocol
HyperText Transfer ProtocolHyperText Transfer Protocol
HyperText Transfer Protocolponduse
 
File Transfer Protocol
File Transfer ProtocolFile Transfer Protocol
File Transfer Protocolguest029bcd
 
TCP/IP Network ppt
TCP/IP Network pptTCP/IP Network ppt
TCP/IP Network pptextraganesh
 
Simple Network Management Protocol
Simple Network Management ProtocolSimple Network Management Protocol
Simple Network Management ProtocolPrasenjit Gayen
 
Http request and http response
Http request and http responseHttp request and http response
Http request and http responseNuha Noor
 
DNS - Domain Name System
DNS - Domain Name SystemDNS - Domain Name System
DNS - Domain Name SystemPeter R. Egli
 
Pantheon pro GmbH 3D solutions
Pantheon pro GmbH 3D solutionsPantheon pro GmbH 3D solutions
Pantheon pro GmbH 3D solutionsAleksey Egorov
 
Wprowadzenie do HTTP/2
Wprowadzenie do HTTP/2Wprowadzenie do HTTP/2
Wprowadzenie do HTTP/2Gabor Wnuk
 
Intermediate Value Theorem
Intermediate Value TheoremIntermediate Value Theorem
Intermediate Value Theoremgizemk
 
Application layer
Application layerApplication layer
Application layerFarah Hunny
 
Web Server Security Guidelines
Web Server Security GuidelinesWeb Server Security Guidelines
Web Server Security Guidelineswebhostingguy
 
Web Architectures - Web Technologies (1019888BNR)
Web Architectures - Web Technologies (1019888BNR)Web Architectures - Web Technologies (1019888BNR)
Web Architectures - Web Technologies (1019888BNR)Beat Signer
 
Application protocols
Application protocolsApplication protocols
Application protocolsOnline
 

Viewers also liked (18)

HyperText Transfer Protocol
HyperText Transfer ProtocolHyperText Transfer Protocol
HyperText Transfer Protocol
 
Http Vs Https .
Http Vs Https . Http Vs Https .
Http Vs Https .
 
File Transfer Protocol
File Transfer ProtocolFile Transfer Protocol
File Transfer Protocol
 
TCP/IP Network ppt
TCP/IP Network pptTCP/IP Network ppt
TCP/IP Network ppt
 
Web technology
Web technologyWeb technology
Web technology
 
Simple Network Management Protocol
Simple Network Management ProtocolSimple Network Management Protocol
Simple Network Management Protocol
 
Http request and http response
Http request and http responseHttp request and http response
Http request and http response
 
Web server
Web serverWeb server
Web server
 
Application Layer
Application Layer Application Layer
Application Layer
 
DNS - Domain Name System
DNS - Domain Name SystemDNS - Domain Name System
DNS - Domain Name System
 
TCP/IP Basics
TCP/IP BasicsTCP/IP Basics
TCP/IP Basics
 
Pantheon pro GmbH 3D solutions
Pantheon pro GmbH 3D solutionsPantheon pro GmbH 3D solutions
Pantheon pro GmbH 3D solutions
 
Wprowadzenie do HTTP/2
Wprowadzenie do HTTP/2Wprowadzenie do HTTP/2
Wprowadzenie do HTTP/2
 
Intermediate Value Theorem
Intermediate Value TheoremIntermediate Value Theorem
Intermediate Value Theorem
 
Application layer
Application layerApplication layer
Application layer
 
Web Server Security Guidelines
Web Server Security GuidelinesWeb Server Security Guidelines
Web Server Security Guidelines
 
Web Architectures - Web Technologies (1019888BNR)
Web Architectures - Web Technologies (1019888BNR)Web Architectures - Web Technologies (1019888BNR)
Web Architectures - Web Technologies (1019888BNR)
 
Application protocols
Application protocolsApplication protocols
Application protocols
 

Similar to HTTP

HTTPProtocol HTTPProtocol.pptHTTPProtocol.ppt
HTTPProtocol HTTPProtocol.pptHTTPProtocol.pptHTTPProtocol HTTPProtocol.pptHTTPProtocol.ppt
HTTPProtocol HTTPProtocol.pptHTTPProtocol.pptVietAnhNguyen337355
 
Ch2 the application layer protocols_http_3
Ch2 the application layer protocols_http_3Ch2 the application layer protocols_http_3
Ch2 the application layer protocols_http_3Syed Ariful Islam Emon
 
Http request&response session 1 - by Vignesh.N
Http request&response session 1 - by Vignesh.NHttp request&response session 1 - by Vignesh.N
Http request&response session 1 - by Vignesh.NNavaneethan Naveen
 
HTTP Definition and Basics.
HTTP Definition and Basics.HTTP Definition and Basics.
HTTP Definition and Basics.Halah Salih
 
Hypertex transfer protocol
Hypertex transfer protocolHypertex transfer protocol
Hypertex transfer protocolwanangwa234
 
internet programming and java notes 5th sem mca
internet programming and java notes 5th sem mcainternet programming and java notes 5th sem mca
internet programming and java notes 5th sem mcaRenu Thakur
 
HTTPs Strict Transport Security
HTTPs    Strict Transport Security HTTPs    Strict Transport Security
HTTPs Strict Transport Security Gol D Roger
 
2. http, html
2. http, html2. http, html
2. http, htmlAnusAhmad
 
The introduction of RESTful
The introduction of RESTful The introduction of RESTful
The introduction of RESTful Jon Chen
 
application of http.pptx
application of http.pptxapplication of http.pptx
application of http.pptxssuseraf60311
 

Similar to HTTP (20)

HTTPProtocol HTTPProtocol.pptHTTPProtocol.ppt
HTTPProtocol HTTPProtocol.pptHTTPProtocol.pptHTTPProtocol HTTPProtocol.pptHTTPProtocol.ppt
HTTPProtocol HTTPProtocol.pptHTTPProtocol.ppt
 
Ch2 the application layer protocols_http_3
Ch2 the application layer protocols_http_3Ch2 the application layer protocols_http_3
Ch2 the application layer protocols_http_3
 
Http
HttpHttp
Http
 
www and http services
www and http serviceswww and http services
www and http services
 
Http request&response session 1 - by Vignesh.N
Http request&response session 1 - by Vignesh.NHttp request&response session 1 - by Vignesh.N
Http request&response session 1 - by Vignesh.N
 
HTTP Definition and Basics.
HTTP Definition and Basics.HTTP Definition and Basics.
HTTP Definition and Basics.
 
Hypertex transfer protocol
Hypertex transfer protocolHypertex transfer protocol
Hypertex transfer protocol
 
internet programming and java notes 5th sem mca
internet programming and java notes 5th sem mcainternet programming and java notes 5th sem mca
internet programming and java notes 5th sem mca
 
HTTPs Strict Transport Security
HTTPs    Strict Transport Security HTTPs    Strict Transport Security
HTTPs Strict Transport Security
 
Http VS. Https
Http VS. HttpsHttp VS. Https
Http VS. Https
 
HTTP
HTTPHTTP
HTTP
 
2. http, html
2. http, html2. http, html
2. http, html
 
The introduction of RESTful
The introduction of RESTful The introduction of RESTful
The introduction of RESTful
 
Http
HttpHttp
Http
 
DNS & HTTP overview
DNS & HTTP overviewDNS & HTTP overview
DNS & HTTP overview
 
Webbasics
WebbasicsWebbasics
Webbasics
 
application of http.pptx
application of http.pptxapplication of http.pptx
application of http.pptx
 
Application layer
Application layerApplication layer
Application layer
 
Http_Protocol.pptx
Http_Protocol.pptxHttp_Protocol.pptx
Http_Protocol.pptx
 
web_01_HTTP.ppt
web_01_HTTP.pptweb_01_HTTP.ppt
web_01_HTTP.ppt
 

Recently uploaded

Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 

Recently uploaded (20)

Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 

HTTP

  • 1. HTTP Submitted To: Er. Neha Chhabra Assistant Professor Computer Science and Engineering Department
  • 2. HTTP   HTTP stands for Hypertext Transfer Protocol. It is an TCP/IP based communication protocol which is used to deliver virtually all files and other data, collectively called resources, on the World Wide Web. These resources could be HTML files, image files, query results, or anything else. A browser is works as an HTTP client because it sends requests to an HTTP server which is called Web server. The Web Server then sends responses back to the client. The standard and default port for HTTP servers to listen on is 80 but it can be changed to any other port like 8080 etc.
  • 3. There are three important things about HTTP of which you should be aware:    HTTP is connectionless: After a request is made, the client disconnects from the server and waits for a response. The server must re-establish the connection after it process the request. HTTP is media independent: Any type of data can be sent by HTTP as long as both the client and server know how to handle the data content. HTTP is stateless: This is a direct result of HTTP's being connectionless. The server and client are aware of each other only during a request. Afterwards, each forgets the other. For this reason neither the client nor the browser can retain information between different request across the web pages.
  • 4. Following diagram shows where HTTP Protocol fits in communication:
  • 5. HTTP Message Structure Like most network protocols, HTTP uses the client-server model: An HTTP client opens a connection and sends a request message to an HTTP server; the server then returns a response message, usually containing the resource that was requested. After delivering the response, the server closes the connection.  The format of the request and response messages are similar and will have following structure:  An initial line  Zero or more header lines  A blank line  An optional message body like file, query data or query output. 
  • 6. Initial Line : Request  The initial line is different for the request than for the response. A request line has three parts, separated by spaces:  An HTTP Method Name  The local path of the requested resource.  The version of HTTP being used.  GET is the most common HTTP method. Other methods could be POST, HEAD etc.  The path is the part of the URL after the host name. This path is also called the request Uniform Resource Identifier (URI). A URI is like a URL, but more general.  The HTTP version always takes the form "HTTP/x.x", uppercase.
  • 7. EXAMPLE OF Initial Line : Request GET /path/to/file/index.html HTTP/1.0
  • 8. Initial Line : Response The initial response line, called the status line, also has three parts separated by spaces:  The version of HTTP being used.  A response status code that gives the result of the request.  An English reason phrase describing the status code.
  • 9. EXAMPLE of Initial Line : Response HTTP/1.0 200 OK or HTTP/1.0 404 Not Found
  • 10. Header Lines       Header lines provide information about the request or response, or about the object sent in the message body. The header lines are in the usual text header format, which is: one line per header, of the form "Header-Name: value". It's the same format used for email and news postings. A header line should end in. The header name is not case-sensitive. Any number of spaces or tabs may be between the ":" and the value. Header lines beginning with space or tab are actually part of the previous header line, folded into multiple lines for easy reading.
  • 11. EXAMPLE of Header Lines User-agent: Mozilla/3.0Gold Or Last-Modified: Fri, 31 Dec 1999 23:59:59 GMT
  • 12. The Message Body An HTTP message may have a body of data sent after the header lines. In a response, this is where the requested resource is returned to the client (the most common use of the message body), or perhaps explanatory text if there's an error. In a request, this is where user-entered data or uploaded files are sent to the server.  If an HTTP message includes a body, there are usually header lines in the message that describe the body. In particular:  The Content-Type: Header gives the MIME-type (Multi-purpose Internet Mail Extensions) of the data in the body, such as text/html or image/gif.  The Content-Length: Header gives the number of bytes in the body. 
  • 13. Request Methods  HTTP defines methods (sometimes referred to as verbs) to indicate the desired action to be performed on the identified resource.  The HTTP/1.0 defined the GET, POST and HEAD methods and the HTTP/1.1 added 5 new methods: OPTIONS, PUT, DELETE, TRACE and CONNECT.
  • 14. Above Methods are defined as:    GET : Requests a representation of the specified resource. Requests using GET should only retrieve data and should have no other effect. (This is also true of some other HTTP methods). The W3C has published guidance principles on this distinction, saying, "Web application design should be informed by the above principles, but also by the relevant limitations." See safe methods below. HEAD : Asks for the response identical to the one that would correspond to a GET request, but without the response body. This is useful for retrieving meta-information written in response headers, without having to transport the entire content. POST :Requests that the server accept the entity enclosed in the request as a new subordinate of the web resource identified by the URI. The data posted might be, as examples, an annotation for existing resources; a message for a bulletin board, newsgroup, mailing list, or comment thread; a block of data that is the result of submitting a web form to a datahandling process; or an item to add to a database.
  • 15. Methods (contd.)        PUT : Requests that the enclosed entity be stored under the supplied URI. If the URI refers to an already existing resource, it is modified; if the URI does not point to an existing resource, then the server can create the resource with that URI. DELETE :Deletes the specified resource. TRACE : Echoes back the received request so that a client can see what (if any) changes or additions have been made by intermediate servers. OPTIONS : Returns the HTTP methods that the server supports for the specified URL. This can be used to check the functionality of a web server by requesting '*' instead of a specific resource. CONNECT : Converts the request connection to a transparent TCP/IP tunnel, usually to facilitate SSL-encrypted communication (HTTPS) through an unencrypted HTTP proxy. PATCH : Is used to apply partial modifications to a resource. HTTP servers are required to implement at least the GET and HEAD methods and, whenever possible, also the OPTIONS method.
  • 17. 1xx : Information Message: 100 Continue Description: Only a part of the request has been received by the server, but as long as it has not been rejected, the client should continue with the request 101 Switching Protocols The server switches protocol
  • 18. 2xx : Successful Message: Description: 200 OK 201 Created The request is OK The request is complete, and a new resource is created The request is accepted for processing, but the processing is not complete 202 Accepted 203 Non-authoritative Information 204 No Content 205 Reset Content 206 Partial Content
  • 19. 5xx : Server Error Message: 500 Internal Server Error 501 Not Implemented 502 Bad Gateway 503 Service Unavailable 504 Gateway Timeout 505 HTTP Version Not Supported Description: The request was not completed. The server met an unexpected condition The request was not completed. The server did not support the functionality required The request was not completed. The server received an invalid response from the upstream server The request was not completed. The server is temporarily overloading or down The gateway has timed out The server does not support the "http protocol" version
  • 21. THANK YOU An Effort By :VAIBHAV RAI 6312077