generated from mwc/lab_riddles
39 lines
1.4 KiB
Markdown
39 lines
1.4 KiB
Markdown
# 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.
|
|
|
|
Line 5: Keeps the connection open for multiple requests/responses.
|
|
|
|
Line 6: Shows where the request is being sent
|
|
|
|
Line 7: This shows who is making the HTTP request.
|
|
|
|
Line 13: This shows the length of the requested information.
|
|
|
|
Line 14: This shows the filetype of what was requested.
|
|
|
|
## 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.
|
|
|
|
400 Bad Request:
|
|
|
|
http -v post https://riddles.makingwithcode.org/guess id=1000 answer="a short-legged cow"
|
|
http -v post https://riddles.makingwithcode.org/guess id=invalid_id answer="a short-legged cow"
|
|
|
|
404 Not Found:
|
|
|
|
http -v post https://riddles.makingwithcode.org/guess/this_is_wrong id=1 answer="a short-legged cow"
|
|
http -v post https://riddles.makingwithcode.org/guessssssssssssssss id=1 answer="a short-legged cow"
|
|
|
|
405 Method Not Found:
|
|
|
|
http -v posts https://riddles.makingwithcode.org/guess id=1 answer="a short-legged cow"
|
|
http -v invalidmethod https://riddles.makingwithcode.org/guess id=1 answer="a short-legged cow"
|