diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..4a96c22 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +source .venv/bin/activate \ No newline at end of file diff --git a/notes.md b/notes.md index 3a338be..3efdc44 100644 --- a/notes.md +++ b/notes.md @@ -7,7 +7,149 @@ 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. +1$ http -v get https://riddles.makingwithcode.org/all ## -v means verbose - + ## "It shows headers, body, and metadata for both the request and the response." - Google Search +2GET /all HTTP/1.1 ## GET means retrieve the following URL in read-only mode. +3Accept: */* ## */* means wildcard for "all files". +4Accept-Encoding: gzip, deflate ## IDK +5Connection: keep-alive ## IDK +6Host: riddles.makingwithcode.org ## Host is the server name here. +7User-Agent: HTTPie/3.2.1 ## tells you what version of the HTTPie Command-Line + ## HTTP Client is running on Ubuntu OS. + ## 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. +## https://riddles.makingwithcode.org - No such file or directory + +## http get https://riddles.makingwithcode.org +## HTTP/1.1 404 Not Found +Connection: keep-alive +Content-Encoding: gzip +Content-Type: text/html; charset=utf-8 +Cross-Origin-Opener-Policy: same-origin +Date: Thu, 12 Feb 2026 20:49:54 GMT +Referrer-Policy: same-origin +Server: nginx/1.24.0 (Ubuntu) +Transfer-Encoding: chunked +X-Content-Type-Options: nosniff +X-Frame-Options: DENY + + + + + Not Found + + +

Not Found

The requested resource was not found on this server.

+ + + +## http get https://riddles.makingwithcode.org/all +## HTTP/1.1 200 OK +Connection: keep-alive +Content-Length: 1484 +Content-Type: application/json +Cross-Origin-Opener-Policy: same-origin +Date: Thu, 12 Feb 2026 20:52:08 GMT +Referrer-Policy: same-origin +Server: nginx/1.24.0 (Ubuntu) +X-Content-Type-Options: nosniff +X-Frame-Options: DENY + +{ + "riddles": [ + { + "correct": 0, + "difficulty": 0.0, + "guesses": 0, + "id": 7, + "question": "how did the triangle hit on the other triangle?" + }, + { + "correct": 2, + "difficulty": 0.0, + "guesses": 2, + "id": 10, + "question": "what's my favorite color?" + }, + { + "correct": 1, + "difficulty": 0.0, + "guesses": 1, + "id": 11, + "question": "hello" + }, + { + "correct": 0, + "difficulty": 0.0, + "guesses": 0, + "id": 12, + "question": "What have I got in my pocket?" + }, + { + "correct": 0, + "difficulty": 0.0, + "guesses": 0, + "id": 13, + "question": "What have I got in my pocket?" + }, + { + "correct": 4, + "difficulty": 0.16666666666666663, + "guesses": 5, + "id": 2, + "question": "What did the triangle say to the cirle?" + }, + { + "correct": 1, + "difficulty": 0.33333333333333337, + "guesses": 2, + "id": 5, + "question": "What have I got in my pocket?" + }, + { + "correct": 1, + "difficulty": 0.33333333333333337, + "guesses": 2, + "id": 6, + "question": "What has to be broken before you can use it?" + }, + { + "correct": 0, + "difficulty": 0.5, + "guesses": 1, + "id": 8, + "question": "What have I got in my pocket?" + }, + { + "correct": 6, + "difficulty": 0.5333333333333333, + "guesses": 14, + "id": 1, + "question": "Where do you get dragon milk?" + }, + { + "correct": 0, + "difficulty": 0.6666666666666667, + "guesses": 2, + "id": 9, + "question": "What have I got in my pocket?" + }, + { + "correct": 2, + "difficulty": 0.7857142857142857, + "guesses": 13, + "id": 3, + "question": "What have I got in my pocket?" + }, + { + "correct": 0, + "difficulty": 0.8333333333333334, + "guesses": 5, + "id": 4, + "question": "How many eggs can a rooster lay?" + } + ] +}