SlideShare uma empresa Scribd logo
1 de 32
Baixar para ler offline
Web Interaction: HTTP




        Hypertext Transfer Protocol
Client Server Architecture
Request Response Model

                         Request

        Client                             Server

 ●   Needs services                 ● Contains the service
 (data) from another                ●Waits    for    client
 node (the server)                  requests
 ●Sends requests                    ●Sends Responses

 ●Waits for responses

 ●Usually contains the

 UI

                         Response
Client – Server Apps in Web




●   Client: User Agent a.k.a. The Web Browser
    ● The first Web Browser created by Tim Berners-

      Lee (WorldWideWeb)
    ● The software we use to surf the web.
Client-Server Apps in Web


●   Server: The Web Server
    ● Also known as HTTP Server.

    ● Server that hosts web content.

    ● Most web servers can be configured to handle

      dynamic content
      ● Usually, 'attach' a programming language and

        related tools to the server and you're ready to do
        web programming.
Browser – Server Interaction

●   PROTOCOL
    ● System of that two or more communicating parties

      follow when they 'talk' with each other.
    ● For Web: HTTP, Hypertext Transfer Protocol

    ● When Accessing a web page, the browser makes

      an HTTP Request (message) and sends to the
      server.
    ● Server creates one or more HTTP Responses as a

      response to request.
    ● HTTP is a “text-based” protocol.
The HTTP Request
When does a browser makes a request?
● When user types a URL on the address bar of

  the browser.
The HTTP Request
When does a browser makes a request?
● When   additional resources are linked to a
  resource.
The HTTP Request
When does a browser makes a request?
● When the user clicks on a hyperlink (and the

  hyperlink refers to a Web Resource).
The HTTP Request
When does a browser makes a request?
● As a response to a request redirect.
The HTTP Request
When does a browser makes a request?
● User Submits a Web Form.
The HTTP Request

●   HTTP Request
    ● The message that browsers send to web servers.

    ● Contains information about the request, kind of

      request, where the request comes from, type of
      browser used, etc...
    Request       = Request-Line
                    *(( general-header
                       | request-header
                       | entity-header ) CRLF)
                    CRLF
                    [ message-body ]
Parts of the Request



●   Request Line
    ● The First Line of the Request

    ● It tells us what kind of HTTP Request it is (Method)

    ● The URI (resource) being requested

    ● Protocol Version.


    Request-Line= Method SP Request-URI SP HTTP-Version CRLF
Parts of the Request Line : Kinds of
Requests

  Method   = "OPTIONS"
           | "GET"
           | "HEAD"
           | "POST"
           | "PUT"
            | "DELETE"
            | "TRACE"
            | "CONNECT"
            | extension-method


extension-method = token
Kinds of Requests
●   OPTIONS - Request for information about
    communication options available at the service
    provider (server) and/or options regarding a
    resource.
●   GET – retrieve whatever information is identified
    by the Request-URI.
●   HEAD – identical to GET but only gets
    metainformation about the request.
●   POST – covers different functions
      ●   Annotation of existing resources
      ●   “posting” a message
      ●   Providing data for a data handling process
      ●   Extending a database
Kinds of Requests

●   PUT – store supplied entity at the server under
    supplied URI
●   DELETE – removes resource identified by
    request-URI
●   TRACE – remote, application-layer loop back of
    the message (for debugging)
●   CONNECT – for use with a proxy.
Parts of the Request Line: Request
URI & HTTP Version


● Request-URI: URI of the resource, may be relative*
  or absolute
● HTTP Version

  ● HTTP/0.9

  ● HTTP/1.0

  ● HTTP/1.1
Examples


GET http://www.w3.org/pub/WWW/TheProject.html HTTP/1.1


OPTIONS * HTTP/1.1


DELETE /pub/WWW/TheProject.html HTTP/1.1
Host: www.w3.org

TRACE * HTTP/1.1
Headers

● From the second line up to the empty line before the
  message body are called headers
● Three types of headers

  ● General Headers: Common headers also used in

    responses, e.g. Date, Host, etc..
  ● Request Headers: Information about the Client

  ● Entity Headers: Information about the content of

    the request message body (e.g. When transferring
    files via upload).

    Header-Name: Value CRLF
General Headers


    general-header = Cache-Control
                    | Connection
                    | Date
                    | Pragma
                    | Trailer
                    | Transfer-Encoding
                    | Upgrade
                    | Via
                    | Warning
Request Headers
   request-header =   Accept
                  |   Accept-Charset
                  |   Accept-Encoding
                  |   Accept-Language
                  |   Authorization
                  |   Expect
                  |   From
                  |   Host
                  |   If-Match
                  |   If-Modified-Since
                  |   If-None-Match
                  |   If-Range
                  |   If-Unmodified-Since
                  |   Max-Forwards
                  |   Proxy-Authorization
                  |   Range
                  |   Referer
                  |   TE
                  |   User-Agent
Entity Headers

     entity-header   =   Allow
                     |   Content-Encoding
                     |   Content-Language
                     |   Content-Length
                     |   Content-Location
                     |   Content-MD5
                     |   Content-Range
                     |   Content-Type
                     |   Expires
                     |   Last-Modified
                     |   extension-header

     extension-header = message-header
Message Body
●   Message Body = Entity Body encoded as per
    Encoding specified by entity headers.
    ● Instances when there is a message body:

      ● When submitting a POST request (i.e. form data

        is encoded in the body).
      ● When submitting a form with a file attachment

        (i.e. file upload).
Example


GET / HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/
    jpeg, image/pjpeg, */*
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE
    5.01; Windows NT)
Host: hypothetical.ora.com
Connection: Keep-Alive
HTTP Response

● Also a text encoded message from web server to
  browser.
● One   request may trigger multiple responses
  depending on size of response.

         Response      = Status-Line
                       *(( general-header
                        | response-header
                        | entity-header ) CRLF)
                       CRLF
                       [ message-body ]
Parts of HTTP Response: Status-
     Line


●   Status line tells us
    ● HTTP Version

    ● The Status Code and Phrase, which tells us if the

      request was successfully processed (or not)
    Status-Line = HTTP-Version SP Status-Code SP Reason-Phrase CRLF
Status Code and Reason Phrase



● Status Code: A 3-digit number corresponding to a
  response type.
● Reason Phrase:   Describes the response or result of
  processing the request.
● Status  Codes grouped according to kind of
  response, grouping determined by the first digit.
Status Code and Reason Phrase
Status Codes

 - 1xx: Informational - Request received, continuing process

 - 2xx: Success - The action was successfully received,
   understood, and accepted

 - 3xx: Redirection - Further action must be taken in order to
   complete the request

 - 4xx: Client Error - The request contains bad syntax or cannot
   be fulfilled

 - 5xx: Server Error - The server failed to fulfill an apparently
   valid request
Assignment:




                MEMORIZE
                  41 or so
   Status Codes and Corresponding Phrases
Response Header


●   Contains information about the server.
         response-header =   Accept-Ranges
                         |   Age
                         |   ETag
                         |   Location
                         |   Proxy-Authenticate
                         |   Retry-After
                         |   Server
                         |   Vary
                         |   WWW-Authenticate
Response Example
HTTP/1.1 200 OK
Date: Mon, 06 Dec 1999 20:54:26 GMT
Server: Apache/1.3.6 (Unix)
Last-Modified: Fri, 04 Oct 1996 14:06:11 GMT
ETag: "2f5cd-964-381e1bd6"
Accept-Ranges: bytes
Content-length: 327
Connection: close
Content-type: text/html

<title>Sample Homepage</title>
<img src="/images/oreilly_mast.gif">
<h1>Welcome</h2>
Hi there, this is a simple web page. Granted, it may not
be as elegant as some other web pages you've seen on the net,
  but there are
some common qualities:

<ul>
  <li> An image,
  <li> Text,
  <li> and a <a href="/example2.html"> hyperlink. </a>
</ul>
HTTP Communication

Mais conteúdo relacionado

Mais procurados

Getting Started with HTML5 in Tech Com (STC 2012)
Getting Started with HTML5 in Tech Com (STC 2012)Getting Started with HTML5 in Tech Com (STC 2012)
Getting Started with HTML5 in Tech Com (STC 2012)Peter Lubbers
 
C# ASP.NET WEB API APPLICATION DEVELOPMENT
C# ASP.NET WEB API APPLICATION DEVELOPMENTC# ASP.NET WEB API APPLICATION DEVELOPMENT
C# ASP.NET WEB API APPLICATION DEVELOPMENTDr. Awase Khirni Syed
 
Web Development In 2018
Web Development In 2018Web Development In 2018
Web Development In 2018Traversy Media
 
Restful Web Services
Restful Web ServicesRestful Web Services
Restful Web ServicesAngelin R
 
REST-API introduction for developers
REST-API introduction for developersREST-API introduction for developers
REST-API introduction for developersPatrick Savalle
 
Web service Introduction
Web service IntroductionWeb service Introduction
Web service IntroductionMadhukar Kumar
 
Fundamentals of Web Development For Non-Developers
Fundamentals of Web Development For Non-DevelopersFundamentals of Web Development For Non-Developers
Fundamentals of Web Development For Non-DevelopersLemi Orhan Ergin
 
Express JS Middleware Tutorial
Express JS Middleware TutorialExpress JS Middleware Tutorial
Express JS Middleware TutorialSimplilearn
 
Web Development Presentation
Web Development PresentationWeb Development Presentation
Web Development PresentationTurnToTech
 
Front end development session1
Front end development session1Front end development session1
Front end development session1marwa Ayad Mohamed
 
Rest presentation
Rest  presentationRest  presentation
Rest presentationsrividhyau
 
ASP.NET Web API and HTTP Fundamentals
ASP.NET Web API and HTTP FundamentalsASP.NET Web API and HTTP Fundamentals
ASP.NET Web API and HTTP FundamentalsIdo Flatow
 

Mais procurados (20)

Getting Started with HTML5 in Tech Com (STC 2012)
Getting Started with HTML5 in Tech Com (STC 2012)Getting Started with HTML5 in Tech Com (STC 2012)
Getting Started with HTML5 in Tech Com (STC 2012)
 
C# ASP.NET WEB API APPLICATION DEVELOPMENT
C# ASP.NET WEB API APPLICATION DEVELOPMENTC# ASP.NET WEB API APPLICATION DEVELOPMENT
C# ASP.NET WEB API APPLICATION DEVELOPMENT
 
Rest web services
Rest web servicesRest web services
Rest web services
 
NEXT.JS
NEXT.JSNEXT.JS
NEXT.JS
 
Web Development In 2018
Web Development In 2018Web Development In 2018
Web Development In 2018
 
Restful Web Services
Restful Web ServicesRestful Web Services
Restful Web Services
 
REST-API introduction for developers
REST-API introduction for developersREST-API introduction for developers
REST-API introduction for developers
 
Nextjs13.pptx
Nextjs13.pptxNextjs13.pptx
Nextjs13.pptx
 
Web service Introduction
Web service IntroductionWeb service Introduction
Web service Introduction
 
Fundamentals of Web Development For Non-Developers
Fundamentals of Web Development For Non-DevelopersFundamentals of Web Development For Non-Developers
Fundamentals of Web Development For Non-Developers
 
.Net Core
.Net Core.Net Core
.Net Core
 
Web api
Web apiWeb api
Web api
 
Express JS Middleware Tutorial
Express JS Middleware TutorialExpress JS Middleware Tutorial
Express JS Middleware Tutorial
 
Web Development Presentation
Web Development PresentationWeb Development Presentation
Web Development Presentation
 
Front end development session1
Front end development session1Front end development session1
Front end development session1
 
Soap vs rest
Soap vs restSoap vs rest
Soap vs rest
 
Expressjs
ExpressjsExpressjs
Expressjs
 
Rest presentation
Rest  presentationRest  presentation
Rest presentation
 
ASP.NET Web API and HTTP Fundamentals
ASP.NET Web API and HTTP FundamentalsASP.NET Web API and HTTP Fundamentals
ASP.NET Web API and HTTP Fundamentals
 
SignalR Overview
SignalR OverviewSignalR Overview
SignalR Overview
 

Semelhante a HTTP

REST & RESTful Web Service
REST & RESTful Web ServiceREST & RESTful Web Service
REST & RESTful Web ServiceHoan Vu Tran
 
Restful web services with java
Restful web services with javaRestful web services with java
Restful web services with javaVinay Gopinath
 
RESTful web services using java and spring
RESTful web services using java and springRESTful web services using java and spring
RESTful web services using java and springMuhammad Junaid Ansari
 
PHP Training: Module 1
PHP Training: Module 1PHP Training: Module 1
PHP Training: Module 1hussulinux
 
Hypertex transfer protocol
Hypertex transfer protocolHypertex transfer protocol
Hypertex transfer protocolwanangwa234
 
Module 5 Application and presentation Layer .pptx
Module 5 Application and presentation Layer .pptxModule 5 Application and presentation Layer .pptx
Module 5 Application and presentation Layer .pptxAASTHAJAJOO
 
ASP.NET Mvc 4 web api
ASP.NET Mvc 4 web apiASP.NET Mvc 4 web api
ASP.NET Mvc 4 web apiTiago Knoch
 
Httpbasics 1207412539273264-9-converted
Httpbasics 1207412539273264-9-convertedHttpbasics 1207412539273264-9-converted
Httpbasics 1207412539273264-9-convertedcomputerorganization
 
Web Services 2009
Web Services 2009Web Services 2009
Web Services 2009Cathie101
 
Web Services 2009
Web Services 2009Web Services 2009
Web Services 2009Cathie101
 
web-servers3952 (1)qwjelkjqwlkjkqlwe.ppt
web-servers3952 (1)qwjelkjqwlkjkqlwe.pptweb-servers3952 (1)qwjelkjqwlkjkqlwe.ppt
web-servers3952 (1)qwjelkjqwlkjkqlwe.ppt20521742
 
Servlet.ppt
Servlet.pptServlet.ppt
Servlet.pptkstalin2
 

Semelhante a HTTP (20)

Web technologies: HTTP
Web technologies: HTTPWeb technologies: HTTP
Web technologies: HTTP
 
REST & RESTful Web Service
REST & RESTful Web ServiceREST & RESTful Web Service
REST & RESTful Web Service
 
IP UNIT 1.pptx
IP UNIT 1.pptxIP UNIT 1.pptx
IP UNIT 1.pptx
 
Restful web services with java
Restful web services with javaRestful web services with java
Restful web services with java
 
RESTful web services using java and spring
RESTful web services using java and springRESTful web services using java and spring
RESTful web services using java and spring
 
PHP Training: Module 1
PHP Training: Module 1PHP Training: Module 1
PHP Training: Module 1
 
Browser
BrowserBrowser
Browser
 
Web & HTTP
Web & HTTPWeb & HTTP
Web & HTTP
 
Hypertex transfer protocol
Hypertex transfer protocolHypertex transfer protocol
Hypertex transfer protocol
 
Module 5 Application and presentation Layer .pptx
Module 5 Application and presentation Layer .pptxModule 5 Application and presentation Layer .pptx
Module 5 Application and presentation Layer .pptx
 
Introduction to HTTP
Introduction to HTTPIntroduction to HTTP
Introduction to HTTP
 
ASP.NET Mvc 4 web api
ASP.NET Mvc 4 web apiASP.NET Mvc 4 web api
ASP.NET Mvc 4 web api
 
Httpbasics 1207412539273264-9-converted
Httpbasics 1207412539273264-9-convertedHttpbasics 1207412539273264-9-converted
Httpbasics 1207412539273264-9-converted
 
Ch-1_.ppt
Ch-1_.pptCh-1_.ppt
Ch-1_.ppt
 
Web Services 2009
Web Services 2009Web Services 2009
Web Services 2009
 
Web Services 2009
Web Services 2009Web Services 2009
Web Services 2009
 
web-servers3952 (1)qwjelkjqwlkjkqlwe.ppt
web-servers3952 (1)qwjelkjqwlkjkqlwe.pptweb-servers3952 (1)qwjelkjqwlkjkqlwe.ppt
web-servers3952 (1)qwjelkjqwlkjkqlwe.ppt
 
Http protocol
Http protocolHttp protocol
Http protocol
 
Servlet.ppt
Servlet.pptServlet.ppt
Servlet.ppt
 
Servlet.ppt
Servlet.pptServlet.ppt
Servlet.ppt
 

Mais de MaeEstherMaguadMaralit (15)

Chapter2c
Chapter2cChapter2c
Chapter2c
 
Chapter2b
Chapter2bChapter2b
Chapter2b
 
Chapter2a
Chapter2aChapter2a
Chapter2a
 
Chapter1c
Chapter1cChapter1c
Chapter1c
 
Chapter1b
Chapter1bChapter1b
Chapter1b
 
Chapter1a
Chapter1aChapter1a
Chapter1a
 
Chapter2d
Chapter2dChapter2d
Chapter2d
 
linked list (CMSC 123)
linked list (CMSC 123)linked list (CMSC 123)
linked list (CMSC 123)
 
The lovedare
The lovedareThe lovedare
The lovedare
 
Cmsc 100 (web content)
Cmsc 100  (web content)Cmsc 100  (web content)
Cmsc 100 (web content)
 
Cmsc 100 (web forms)
Cmsc 100 (web forms)Cmsc 100 (web forms)
Cmsc 100 (web forms)
 
Cmsc 100 xhtml and css
Cmsc 100 xhtml and cssCmsc 100 xhtml and css
Cmsc 100 xhtml and css
 
Cmsc 100 (web programming in a nutshell)
Cmsc 100 (web programming in a nutshell)Cmsc 100 (web programming in a nutshell)
Cmsc 100 (web programming in a nutshell)
 
Chapter2a
Chapter2aChapter2a
Chapter2a
 
Chapter1b
Chapter1bChapter1b
Chapter1b
 

Último

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 

Último (20)

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

HTTP

  • 1. Web Interaction: HTTP Hypertext Transfer Protocol
  • 2. Client Server Architecture Request Response Model Request Client Server ● Needs services ● Contains the service (data) from another ●Waits for client node (the server) requests ●Sends requests ●Sends Responses ●Waits for responses ●Usually contains the UI Response
  • 3. Client – Server Apps in Web ● Client: User Agent a.k.a. The Web Browser ● The first Web Browser created by Tim Berners- Lee (WorldWideWeb) ● The software we use to surf the web.
  • 4. Client-Server Apps in Web ● Server: The Web Server ● Also known as HTTP Server. ● Server that hosts web content. ● Most web servers can be configured to handle dynamic content ● Usually, 'attach' a programming language and related tools to the server and you're ready to do web programming.
  • 5. Browser – Server Interaction ● PROTOCOL ● System of that two or more communicating parties follow when they 'talk' with each other. ● For Web: HTTP, Hypertext Transfer Protocol ● When Accessing a web page, the browser makes an HTTP Request (message) and sends to the server. ● Server creates one or more HTTP Responses as a response to request. ● HTTP is a “text-based” protocol.
  • 6. The HTTP Request When does a browser makes a request? ● When user types a URL on the address bar of the browser.
  • 7. The HTTP Request When does a browser makes a request? ● When additional resources are linked to a resource.
  • 8. The HTTP Request When does a browser makes a request? ● When the user clicks on a hyperlink (and the hyperlink refers to a Web Resource).
  • 9. The HTTP Request When does a browser makes a request? ● As a response to a request redirect.
  • 10. The HTTP Request When does a browser makes a request? ● User Submits a Web Form.
  • 11. The HTTP Request ● HTTP Request ● The message that browsers send to web servers. ● Contains information about the request, kind of request, where the request comes from, type of browser used, etc... Request = Request-Line *(( general-header | request-header | entity-header ) CRLF) CRLF [ message-body ]
  • 12. Parts of the Request ● Request Line ● The First Line of the Request ● It tells us what kind of HTTP Request it is (Method) ● The URI (resource) being requested ● Protocol Version. Request-Line= Method SP Request-URI SP HTTP-Version CRLF
  • 13. Parts of the Request Line : Kinds of Requests Method = "OPTIONS" | "GET" | "HEAD" | "POST" | "PUT" | "DELETE" | "TRACE" | "CONNECT" | extension-method extension-method = token
  • 14. Kinds of Requests ● OPTIONS - Request for information about communication options available at the service provider (server) and/or options regarding a resource. ● GET – retrieve whatever information is identified by the Request-URI. ● HEAD – identical to GET but only gets metainformation about the request. ● POST – covers different functions ● Annotation of existing resources ● “posting” a message ● Providing data for a data handling process ● Extending a database
  • 15. Kinds of Requests ● PUT – store supplied entity at the server under supplied URI ● DELETE – removes resource identified by request-URI ● TRACE – remote, application-layer loop back of the message (for debugging) ● CONNECT – for use with a proxy.
  • 16. Parts of the Request Line: Request URI & HTTP Version ● Request-URI: URI of the resource, may be relative* or absolute ● HTTP Version ● HTTP/0.9 ● HTTP/1.0 ● HTTP/1.1
  • 17. Examples GET http://www.w3.org/pub/WWW/TheProject.html HTTP/1.1 OPTIONS * HTTP/1.1 DELETE /pub/WWW/TheProject.html HTTP/1.1 Host: www.w3.org TRACE * HTTP/1.1
  • 18. Headers ● From the second line up to the empty line before the message body are called headers ● Three types of headers ● General Headers: Common headers also used in responses, e.g. Date, Host, etc.. ● Request Headers: Information about the Client ● Entity Headers: Information about the content of the request message body (e.g. When transferring files via upload). Header-Name: Value CRLF
  • 19. General Headers general-header = Cache-Control | Connection | Date | Pragma | Trailer | Transfer-Encoding | Upgrade | Via | Warning
  • 20. Request Headers request-header = Accept | Accept-Charset | Accept-Encoding | Accept-Language | Authorization | Expect | From | Host | If-Match | If-Modified-Since | If-None-Match | If-Range | If-Unmodified-Since | Max-Forwards | Proxy-Authorization | Range | Referer | TE | User-Agent
  • 21. Entity Headers entity-header = Allow | Content-Encoding | Content-Language | Content-Length | Content-Location | Content-MD5 | Content-Range | Content-Type | Expires | Last-Modified | extension-header extension-header = message-header
  • 22. Message Body ● Message Body = Entity Body encoded as per Encoding specified by entity headers. ● Instances when there is a message body: ● When submitting a POST request (i.e. form data is encoded in the body). ● When submitting a form with a file attachment (i.e. file upload).
  • 23. Example GET / HTTP/1.1 Accept: image/gif, image/x-xbitmap, image/ jpeg, image/pjpeg, */* Accept-Language: en-us Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT) Host: hypothetical.ora.com Connection: Keep-Alive
  • 24. HTTP Response ● Also a text encoded message from web server to browser. ● One request may trigger multiple responses depending on size of response. Response = Status-Line *(( general-header | response-header | entity-header ) CRLF) CRLF [ message-body ]
  • 25. Parts of HTTP Response: Status- Line ● Status line tells us ● HTTP Version ● The Status Code and Phrase, which tells us if the request was successfully processed (or not) Status-Line = HTTP-Version SP Status-Code SP Reason-Phrase CRLF
  • 26. Status Code and Reason Phrase ● Status Code: A 3-digit number corresponding to a response type. ● Reason Phrase: Describes the response or result of processing the request. ● Status Codes grouped according to kind of response, grouping determined by the first digit.
  • 27. Status Code and Reason Phrase
  • 28. Status Codes - 1xx: Informational - Request received, continuing process - 2xx: Success - The action was successfully received, understood, and accepted - 3xx: Redirection - Further action must be taken in order to complete the request - 4xx: Client Error - The request contains bad syntax or cannot be fulfilled - 5xx: Server Error - The server failed to fulfill an apparently valid request
  • 29. Assignment: MEMORIZE 41 or so Status Codes and Corresponding Phrases
  • 30. Response Header ● Contains information about the server. response-header = Accept-Ranges | Age | ETag | Location | Proxy-Authenticate | Retry-After | Server | Vary | WWW-Authenticate
  • 31. Response Example HTTP/1.1 200 OK Date: Mon, 06 Dec 1999 20:54:26 GMT Server: Apache/1.3.6 (Unix) Last-Modified: Fri, 04 Oct 1996 14:06:11 GMT ETag: "2f5cd-964-381e1bd6" Accept-Ranges: bytes Content-length: 327 Connection: close Content-type: text/html <title>Sample Homepage</title> <img src="/images/oreilly_mast.gif"> <h1>Welcome</h2> Hi there, this is a simple web page. Granted, it may not be as elegant as some other web pages you've seen on the net, but there are some common qualities: <ul> <li> An image, <li> Text, <li> and a <a href="/example2.html"> hyperlink. </a> </ul>