Web Science/Part1: Foundations of the web/Web Architecture/Hypertext Transfer Protocol/Making HTTP requests

From Wikiversity
Jump to: navigation, search

New-here.png NewDiscussionButton.png Feed-icon.svg



Quick Navigation: Video - Script - further Reading - Quiz - Discussion


Video of the lesson: Making HTTP requests

Add-to-watchlist-HOCH.png

Quick Navigation: Video - Script - further Reading - Quiz - Discussion

Script for: Making HTTP requests

explain the use of telnet as a tool to establish a TCP connection (also show wireshark network traffic?)

talk about the fact that http is a request response protocol and stateless

telnet studywebscience.org 80 OPTIONS / HTTP/1.0

(show response)

telnet studywebscience.org 80 GET /test/index.html HTTP/1.0 Host: studywebscience.org

(show the response)

Quick Navigation: Video - Script - further Reading - Quiz - Discussion

Further information, readings and exercises about Making HTTP requests


Quick Navigation: Video - Script - further Reading - Quiz - Discussion

Check your understanding of: Making HTTP requests

1. What is the syntax of an HTTP GET request using version 1.0 of HTTP?

GET HTTP/1.0 /path/filename\r\n\r\n
GET /path/filename HTTP/1.0\r\n\r\n
HTTP/1.0 GET /path/filename\r\n\r\n

2. How is the end of the HTTP request marked?

by closing the TCP connection
No! This would make it impossible for the server to answer
By an empty line
yes \r\n\r\n can be used to create a line break + an empty line
FINISH
no this is just made up
none of the above

3. Which of the following are types of HTTP requests

GET
HELP
HEAD
READ
POST
CREATE
PUT
DELETE
ASK
TRACE
OPTIONS
TRANSFER
CONNECT
PATCH
UPDATE

4. How is the end of a HTTP/1.0 response marked?

by closing the TCP connection
By an empty line
FINISH
none of the above

5. What is meant when we say HTTP is a stateless protocol?

all requests have to be idempotent
no some of the HTTP request like post are not idempotent
it cannot be built on top of a connection oriented protocol which creates a session (like tcp)
no user session is created on the web server
Same HTTP requests will always be handled in the same way independent of the last time's outcome and of the last request.

6. Compare peer to peer protocols with client server protocols

P2P Client / Server
every host can make a request and every host can make a response.
some hosts can make requests and some hosts (potentially the same) can make responses.
everyone is allowed to start a conversation and send data
load on the system can become an essential problem
the more hosts using the protocol the more reliable it becomes.
there is no authority

Your score is 0 / 0


Quick Navigation: Video - Script - further Reading - Quiz - Discussion

Discuss Making HTTP requests with others

QuestionButton.png DiscussionButton.png

Join the discussion: Ask and questions and provide answers

  • If you click the ask a question button you're question will appear at the bottom of this list.
  • If you click the give an answer you will be able to provide an answer to the questions that have been asked so far.

Mistake in quiz question #3

According to RFC 2616 "PATCH" is not a valid type of HTTP request. So I will go ahead and fix this in the quiz. If somehow I'm wrong - just revert my changes. --Sergeyd (discusscontribs) 21:29, 11 November 2013 (UTC)

Quiz 5

Same HTTP requests will always be handled in the same way independent of the last time's outcome and of the .

Not finished sentence I guess. --oleamm (discusscontribs) 17:46, 13 November 2013 (UTC)

If Every HTTP request is independent and has no concern with the previous requests made then in a scenario, wherein i log into my gmail account and close the browser without signing out. Then i relaunch the browser and again make an http request to gmail, it never asks for my username and password. why does this happens?

QuestionButton.png DiscussionButton.png


First-mooc-lesson.png Parent-mooc-lesson.png Next-mooc-lesson.png

navigational context


Video
and script
Associated Lesson
Making HTTP requests
A Simple Web Client
A Simple Web Server
The HTTP Header
Content negotiation
Summary, Further readings, Homework

The following video of the flipped classroom associated with this topic are available:

You can find more information on wiki commons and also directly download this file