πŸ‡¬πŸ‡§ πŸ‡¨πŸ‡Ώ
Chapter 3

Whispers in the Dark

═══════════════════════════════════════════════════════════════════ CHAPTER 3: WHISPERS IN THE DARK ═══════════════════════════════════════════════════════════════════ The interrogations have yielded fragments - strange budget items, corrupted records, talk of "cookie leaks." Now you must actively investigate: submit evidence for analysis, file reports, search the archives. The Royal Laboratory awaits your findings. Old Margot in the archives speaks in riddles, but her records don't lie. Time to POST your discoveries and see what the darkness reveals. ═══════════════════════════════════════════════════════════════════
Skills You'll Learn: POST bodies, JSON, Form data, File upload, PUT, DELETE, Async polling

Paste your token to sync progress:

3-1 Submit Evidence
Not Done
The Royal Laboratory can analyze physical evidence. Submit the torn parchment fragment for analysis.
Command
curl -X POST https://httpqueen.net/laboratory/submit \ -H "Authorization: Bearer YOUR-TOKEN" \ -H "Content-Type: application/json" \ -d '{"type": "parchment_fragment", "description": "torn note from crime scene"}'
POST with JSON body is the standard way to send structured data. Content-Type tells the server how to parse your body.
Old Margot whispers: "POST the evidence with JSON describing what you're submitting."
3-2 File Report
Not Done
Sergeant Timothy needs your daily report in the old format - form data, not JSON. The palace bureaucracy demands it.
Command
curl -X POST https://httpqueen.net/reports/daily \ -H "Authorization: Bearer YOUR-TOKEN" \ -d "day=3&suspect=redirect&finding=evasive"
application/x-www-form-urlencoded is the oldest POST format, like HTML forms. Data is key=value pairs joined by &.
Old Margot whispers: "Use form-urlencoded format: -d 'key=value&key2=value2'"
3-3 Query Archives
Not Done
Old Margot guards the archives. Search for any records mentioning 'cookies' - the torn parchment mentioned them.
Command
curl --json '{"query": "cookies", "date_range": "recent"}' \ https://httpqueen.net/archives/search \ -H "Authorization: Bearer YOUR-TOKEN"
The --json flag combines -H 'Content-Type: application/json' -H 'Accept: application/json' -d together. Convenience!
Old Margot whispers: "POST a search query. The --json flag is shorthand for Content-Type: application/json."
3-4 Lab Results
Not Done
The laboratory analysis should be complete. Check on your submitted evidence.
Command
curl https://httpqueen.net/laboratory/results \ -H "Authorization: Bearer YOUR-TOKEN"
Async APIs: POST starts a job, returns an ID. GET with that ID retrieves results. Polling checks if it's done.
Old Margot whispers: "GET the results endpoint. Some operations are async - you POST to start, GET to check results."
3-5 The Discovery
Not Done
Submit your complete findings: the ink analysis, the budget discrepancies, the cookie connection. Build the case.
Command
curl -X POST https://httpqueen.net/evidence/compile \ -H "Authorization: Bearer YOUR-TOKEN" \ -H "Content-Type: application/json" \ -d '{"findings": [{"type": "ink_analysis", "points_to": "security_office"}, {"type": "budget", "item": "session_tokens"}, {"type": "access_control", "controller": "duchess_athena"}]}'
Complex POSTs carry multiple related data points. Structure your JSON to represent the relationships between evidence.
Old Margot whispers: "A complex POST with multiple pieces of evidence. Include everything you've learned."
3-6 Upload the Sketch
Not Done
A witness saw someone near Pemberton's chambers. The court artist made a sketch. Upload it to the evidence archive for facial comparison.
Command
curl -X POST https://httpqueen.net/evidence/upload \ -H "Authorization: Bearer YOUR-TOKEN" \ -F "[email protected]" \ -F "description=Witness sketch from night of murder" \ -F "witness=chamber_guard"
The -F flag sends multipart/form-data, used for file uploads. Unlike -d (form-urlencoded), -F can transmit binary files. Use -F 'field=@filename' to upload a file.
Old Margot whispers: "Use -F for file uploads. This sends multipart/form-data, the format for uploading files via HTTP."
3-7 Amend the Report
Not Done
Your earlier daily report had an error - you wrote 'redirect' but meant 'authenticate' as the suspicious suspect. Update the existing report.
Command
curl -X PUT https://httpqueen.net/reports/daily/3 \ -H "Authorization: Bearer YOUR-TOKEN" \ -H "Content-Type: application/json" \ -d '{"day": 3, "suspect": "authenticate", "finding": "knows_too_much", "status": "amended"}'
PUT replaces an entire resource at a URL. It's idempotent - calling it multiple times has the same effect as once. Use PUT when you have the complete updated resource.
Old Margot whispers: "Use PUT to update an existing resource. Unlike POST (create new), PUT replaces the resource at a specific URL."
3-8 Discard False Lead
Not Done
Earlier evidence suggested the gardener was involved. It was a dead end - remove this false lead from the active evidence list to keep the investigation focused.
Command
curl -X DELETE https://httpqueen.net/evidence/false-leads/gardener \ -H "Authorization: Bearer YOUR-TOKEN"
DELETE removes a resource. Servers typically respond with 200 (with body), 204 (no body), or 202 (accepted for deletion). Like PUT, DELETE is idempotent.
Old Margot whispers: "Use DELETE to remove a resource. The server will confirm removal with 200 or 204."