HCI Web Applications 1 - Hypertext Transfer Protocol
Uploaded by adrianwang2003 · 28 May 2024
Preview
Web Applications Name: __________________________ ( ) Class:_________ Date: _________ Lesson 1: Hypertext Transfer Protocol Instructional Objectives: By the end of this task, you should be able to: ● StatethattheHypertextTransferProtocol(HTTP)is theprotocolusedby browsers to communicate with web servers ● State that under HTTP, each request must start by specifying a HTTP method ● State thatGETandPOSTare examples of HTTP methods ● StatethatunderHTTP, eachresponsestartsbyspecifyinga HTTPstatus code ● State that 200 (OK) and 404 (Not Found) are examples of HTTP status codes ● UsetheDeveloperToolsofa webbrowsertoexaminetherawcontentsof HTTP requests and HTTP responses ● UsethesocketmoduleinPythontosendandreceivebasicHTTPrequests and HTTP responses The World Wide Web (WWW) and Hypertext Transfer Protocol (HTTP) YouhavealreadylearnthowtwoprogramscancommunicateoveranetworkusingInternetsockets.However, sincesocketsonlytransferrawbytesandhavenobuilt-inwaystoindicatethetypeofdatabeingsentorwhy, weusuallyneedtodefineanadditional protocol that is appropriate to the application being developed. Forinstance,ina chatapplication,wemightdesignaprotocolthatlimitseachchatmessagetoa singlelineandindicatestheendofacompletechatmessagewithanewlinecharacter\n. However, for a morecomplexTic-Tac-Toe game,eachmessagemayneedtostartwithoneofseveralpossiblecommands(e.g.,b'MOVE'orb'END') to communicate what each player wants todo in the game. In 1990,a computerscientistnamedTim-BernersLeeworkingat theEuropeanOrganisationforNuclearResearch(alsoknownasCERN)proposedanotherkindofapplicationtofacilitatethesharingandmanagementofinformation.Theapplicationwouldbeasymmetricwithverydifferentclientandserverprograms.Userswouldbe CPDD Computer Education Unit Version: Dec 20181
Web Applications abletoruntheclientprogramandrequestfordocumentsfromcomputersrunningtheserverprogramusingoneofseveralpossiblecommands.Thedocumentssentoverwouldalsobewrittenina newcomputerlanguagetofacilitatehyperlinking,whichis theabilityto referenceonedocumentfromanotherin aneasy-to-followmanner. Tim-BernersLee'sproposalwastremendouslysuccessful,andtoday, wecallthisapplicationtheWorldWideWeb(WWW)orjusttheweb. Tousetheweb,weoftenuseanall-in-oneprogramcalleda webbrowserthatservesasbotha clientforrequestingdocumentsfromwebserversaswellasaviewerforthedocumentsthataresentover. Inparticular, webbrowsersaredesignedtoviewdocumentswrittenusingtheHypertextMarkupLanguage(HTML). In turn,theprotocolusedtorequest for such documents is named theHypertextTransfer Protocol (HTTP). Asoriginallydesigned,requestsandresponsesmadeusingHTTParenotencryptedandcanbereadormodifiedbyanypartyinvolvedinroutingthatdataacrosstheInternet.To preventthis,webrequestsandresponsescanbeencryptedusinganextendedversionofHTTPnamedHTTPS(HTTPSecure). However,HTTPScanbemoredifficultto setupcomparedto plainHTTP, soforlearningpurposeswewillfocusonplainHTTPonly. Nevertheless,beawarethatHTTPSisusuallypreferredand is in fact required for newer versions of
Content continues in the PDF.
Related notes
- ACJC 2025 JC2 Computing Prelim Paper 1Exam Papers · 2025
- ACJC 2025 JC2 Computing Prelim Paper 1 SolutionsExam Papers · 2025
- VJC Chapter 23 Web Applications PrinciplesNotes/Practices · 2025
- VJC Chapter 20 SQLNotes/Practices · 2025
- VJC Chapter 16 Hash TableNotes/Practices · 2025
- VJC Chapter 22 NoSQLNotes/Practices · 2025

