diff --git a/notes.md b/notes.md index 367d594..a3f638c 100644 --- a/notes.md +++ b/notes.md @@ -33,3 +33,103 @@ receiving, I can have it automatically parsed and formatted. 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. + +Using an ID number that does not exist: +$ http -v post https://riddles.makingwithcode.org/guess id=15 answer="a short-legged cow" +POST /guess HTTP/1.1 +Accept: application/json, */*;q=0.5 +Accept-Encoding: gzip, deflate +Connection: keep-alive +Content-Length: 44 +Content-Type: application/json +Host: riddles.makingwithcode.org +User-Agent: HTTPie/3.2.2 + +{ + "answer": "a short-legged cow", + "id": "15" +} + + +HTTP/1.1 400 Bad Request +Connection: keep-alive +Content-Length: 13 +Content-Type: application/json +Cross-Origin-Opener-Policy: same-origin +Date: Wed, 03 Apr 2024 18:32:37 GMT +Referrer-Policy: same-origin +Server: nginx/1.22.0 (Ubuntu) +X-Content-Type-Options: nosniff +X-Frame-Options: DENY + +{ + "error": "" +} + +Using a web address with a typo in it: +$ http -v post https://riddles.makingwithcode.org/gues id=1 answer="a short-legged cow" +POST /gues HTTP/1.1 +Accept: application/json, */*;q=0.5 +Accept-Encoding: gzip, deflate +Connection: keep-alive +Content-Length: 43 +Content-Type: application/json +Host: riddles.makingwithcode.org +User-Agent: HTTPie/3.2.2 + +{ + "answer": "a short-legged cow", + "id": "1" +} + + +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: Wed, 03 Apr 2024 18:34:02 GMT +Referrer-Policy: same-origin +Server: nginx/1.22.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.

+ + + +Using a method that doesn't exist: +$ http -v past https://riddles.makingwithcode.org/guess id=1 answer="a short-legged cow" +PAST /guess HTTP/1.1 +Accept: application/json, */*;q=0.5 +Accept-Encoding: gzip, deflate +Connection: keep-alive +Content-Length: 43 +Content-Type: application/json +Host: riddles.makingwithcode.org +User-Agent: HTTPie/3.2.2 + +{ + "answer": "a short-legged cow", + "id": "1" +} + + +HTTP/1.1 405 Method Not Allowed +Allow: POST +Connection: keep-alive +Content-Length: 0 +Content-Type: text/html; charset=utf-8 +Cross-Origin-Opener-Policy: same-origin +Date: Wed, 03 Apr 2024 18:36:06 GMT +Referrer-Policy: same-origin +Server: nginx/1.22.0 (Ubuntu) +X-Content-Type-Options: nosniff +X-Frame-Options: DENY \ No newline at end of file