SlideShare a Scribd company logo
2
Most read
3
Most read
HTTP REQUEST AND
HTTP RESPONSE
BY
SANA MATEEN
HTTP REQUEST
• HTTP (Hypertext Transfer Protocol) is perhaps the most popular
application protocol used in the Internet (or The WEB).
• HTTP is a stateless protocol. In other words, the current request does
not know what has been done in the previous requests.
• Whenever you issue URL from your browser to get a web resource using
HTTP, the browser turns the URL into a request message and sends it to
the HTTP server. The HTTP server interprets the request message, and
returns you an appropriate response message, which is either the
resource you requested or an error message.
Important header information
Accept This header specifies the MIME types that the browser or other
clients can handle. Values of image/png or image/jpeg are the
two most common possibilities.
Authorization This header is used by clients to identify themselves when
accessing password-protected Web pages.
Content-Length This header is applicable only to POST requests and gives the
size of the POST data in bytes.
Methods to read HTTP Header:
There are following methods which can be used to read HTTP header in your servlet
program. These methods are available with HttpServletRequest object.
Enumeration getHeaderNames()
Returns an enumeration of all the header names this request contains
String getHeader(String name)
Returns the value of the specified request header as a String.
Http request and http response
Http request and http response
HTTP GET REQUEST
Http request and http response
Http request and http response
HTTP POST REQUEST
Http request and http response
Http request and http response
Http request and http response
Http request and http response

More Related Content

ODP
Introduction of Html/css/js
PPTX
HyperText Transfer Protocol (HTTP)
PPTX
HTTP request and response
PPTX
Java Server Pages(jsp)
PPTX
REST & RESTful Web Services
PPTX
Php.ppt
PPTX
JSON: The Basics
PPTX
PHP FUNCTIONS
Introduction of Html/css/js
HyperText Transfer Protocol (HTTP)
HTTP request and response
Java Server Pages(jsp)
REST & RESTful Web Services
Php.ppt
JSON: The Basics
PHP FUNCTIONS

What's hot (20)

PPTX
HTML, CSS And JAVASCRIPT!
PPTX
Web essentials clients, servers and communication – the internet – basic inte...
PDF
HTML CSS Basics
PPTX
Distributed file system
PPTX
Web application framework
PPTX
Form Validation in JavaScript
PPT
Java Servlets
PDF
Introduction to django framework
PPT
Java Script ppt
PDF
javascript objects
PPTX
Document object model(dom)
PPTX
Secure Hash Algorithm (SHA-512)
PPTX
What Is Express JS?
PPT
Javascript
PPTX
NIST Cloud Computing Reference Architecture
PDF
Http methods
PPT
PPTX
Soap vs rest
PDF
Design issues of dos
PPTX
Javascript
HTML, CSS And JAVASCRIPT!
Web essentials clients, servers and communication – the internet – basic inte...
HTML CSS Basics
Distributed file system
Web application framework
Form Validation in JavaScript
Java Servlets
Introduction to django framework
Java Script ppt
javascript objects
Document object model(dom)
Secure Hash Algorithm (SHA-512)
What Is Express JS?
Javascript
NIST Cloud Computing Reference Architecture
Http methods
Soap vs rest
Design issues of dos
Javascript
Ad

Viewers also liked (13)

PPTX
Jsp elements
PPTX
Reading init param
PPT
Understanding layout managers
PPTX
Using cookies and sessions
PPTX
Jdbc in servlets
PPTX
Xml dtd
PPT
Quiz app(j tabbed pane,jdialog,container,actionevent,jradiobutton,buttongroup...
PPTX
Xml schema
PPTX
Dom parser
PPTX
Xml dom
PPT
Events1
PPTX
Intro xml
PPTX
Jsp elements
Reading init param
Understanding layout managers
Using cookies and sessions
Jdbc in servlets
Xml dtd
Quiz app(j tabbed pane,jdialog,container,actionevent,jradiobutton,buttongroup...
Xml schema
Dom parser
Xml dom
Events1
Intro xml
Ad

Similar to Http request and http response (20)

PDF
HTTP Definition and Basics.
PPT
Http request&response session 1 - by Vignesh.N
PPTX
hhtp (3).pptx hyper text transfer protocol
PPTX
Hyper_Text_Transfer_Protocol_Presentation_
PPTX
PPT
web_01_HTTP.ppt
PPTX
PPT
Http request&response
PPTX
Httpbasics 1207412539273264-9-converted
PPTX
Hypertex transfer protocol
PPT
HTTPProtocol HTTPProtocol.pptHTTPProtocol.ppt
PPTX
PPTX
http presentation 1.pptx
PPTX
Compute rNetwork.pptx
PDF
HTTP Request and Response Structure
PPTX
01. http basics v27
PPT
Http request&response by Vignesh 15 MAR 2014
PPT
Hyper text transport protocol
PPTX
Http and its Applications
HTTP Definition and Basics.
Http request&response session 1 - by Vignesh.N
hhtp (3).pptx hyper text transfer protocol
Hyper_Text_Transfer_Protocol_Presentation_
web_01_HTTP.ppt
Http request&response
Httpbasics 1207412539273264-9-converted
Hypertex transfer protocol
HTTPProtocol HTTPProtocol.pptHTTPProtocol.ppt
http presentation 1.pptx
Compute rNetwork.pptx
HTTP Request and Response Structure
01. http basics v27
Http request&response by Vignesh 15 MAR 2014
Hyper text transport protocol
Http and its Applications

Recently uploaded (20)

PDF
Structs to JSON How Go Powers REST APIs.pdf
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PPTX
24AI201_AI_Unit_4 (1).pptx Artificial intelligence
PPTX
ANIMAL INTERVENTION WARNING SYSTEM (4).pptx
PPTX
Practice Questions on recent development part 1.pptx
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PPTX
web development for engineering and engineering
PPTX
MET 305 MODULE 1 KTU 2019 SCHEME 25.pptx
PDF
composite construction of structures.pdf
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PPTX
Geodesy 1.pptx...............................................
PPTX
Unit 5 BSP.pptxytrrftyyydfyujfttyczcgvcd
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PPTX
436813905-LNG-Process-Overview-Short.pptx
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
DOCX
573137875-Attendance-Management-System-original
PPTX
“Next-Gen AI: Trends Reshaping Our World”
Structs to JSON How Go Powers REST APIs.pdf
UNIT-1 - COAL BASED THERMAL POWER PLANTS
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
24AI201_AI_Unit_4 (1).pptx Artificial intelligence
ANIMAL INTERVENTION WARNING SYSTEM (4).pptx
Practice Questions on recent development part 1.pptx
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
web development for engineering and engineering
MET 305 MODULE 1 KTU 2019 SCHEME 25.pptx
composite construction of structures.pdf
Embodied AI: Ushering in the Next Era of Intelligent Systems
Geodesy 1.pptx...............................................
Unit 5 BSP.pptxytrrftyyydfyujfttyczcgvcd
Operating System & Kernel Study Guide-1 - converted.pdf
436813905-LNG-Process-Overview-Short.pptx
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
Model Code of Practice - Construction Work - 21102022 .pdf
573137875-Attendance-Management-System-original
“Next-Gen AI: Trends Reshaping Our World”

Http request and http response

  • 1. HTTP REQUEST AND HTTP RESPONSE BY SANA MATEEN
  • 2. HTTP REQUEST • HTTP (Hypertext Transfer Protocol) is perhaps the most popular application protocol used in the Internet (or The WEB). • HTTP is a stateless protocol. In other words, the current request does not know what has been done in the previous requests. • Whenever you issue URL from your browser to get a web resource using HTTP, the browser turns the URL into a request message and sends it to the HTTP server. The HTTP server interprets the request message, and returns you an appropriate response message, which is either the resource you requested or an error message.
  • 3. Important header information Accept This header specifies the MIME types that the browser or other clients can handle. Values of image/png or image/jpeg are the two most common possibilities. Authorization This header is used by clients to identify themselves when accessing password-protected Web pages. Content-Length This header is applicable only to POST requests and gives the size of the POST data in bytes. Methods to read HTTP Header: There are following methods which can be used to read HTTP header in your servlet program. These methods are available with HttpServletRequest object. Enumeration getHeaderNames() Returns an enumeration of all the header names this request contains String getHeader(String name) Returns the value of the specified request header as a String.