lab_riddles/notes.md

2.2 KiB

Request and response notes

Checkpoint 1

Read the request and response shown on lines 1-32 of the lab. Choose five lines from the request and/or the response. For each, make an inference about the meaning of the line, and some situation in which it might be useful. You are welcome to research the meanings of these headers, but it's also fine to speculate for now.

The following are just inferences based on what I already know and the syntax of the requyest and response.

HTTP/1.1 200 OK-- I think this establishes the type of call (http), a version number, and that the connection of acceptable.

Connection: keep-alive-- This is the command to maintain the connection to the server.

Content-Length: 116-- My guess is that this has to do with the content of the website or server being accessed. The number is part of thatcontent code.

Content-Type: application/json-- The content type is the thing that is being accessed. For example, a website, application, server, data set, etc.

Cross-Origin-Opener-Policy: same-origin-- I think this has to do with the encryption status of the informaiton held in the content. Possibly the "same origin" status could refelect that the information does not have to change from one end of the call to the other.

Date: Tue, 05 Mar 2024 00:25:26 GMT-- This reflects the date in which the information was accessed. I am guessing that when the conection is terminated that the date and time are updated to reflect the severed connection.

{ "riddles": [-- I think that this calls the first element of the website, in this case the riddle. then the remaining 6 lines define the details of that call. { "correct": 1,-- There is one correct answer "difficulty": 0.6,-- Hoe statistically difficult the riddle itself is. "guesses": 4,-- the number of hgusses allowed to get the correct answer. "id": 1,-- The one correct answer "question": "Where do you get dragon milk?"-- The acutal riddle itself.

Checkpoint 2

The goal of this checkpoint is to see what status codes you can get back from the riddle server. Paste below several http requests and the status codes they return.