go-dojo
learn go · earn mastery
phase 0 · 0.5-first-http-hit

Make your first HTTP request in Go

prereqs 0.4-errors-as-values0.1-backend-mental-model
review intervals 3d 7d 21d 60d drills context-timeout

The lesson for this task hasn't been written yet. The mastery criteria below is the shortest description of what you'll own when this task is green.

Mastery criteria

- Use net/http to GET https://httpbin.org/json and print the response body
- Inspect the status code, response headers, and body length
- Handle a timeout with context.WithTimeout (5s)
- Run `curl -v` against the same URL; compare what you see in your Go code to what curl prints

Verify

Run from your go-dojo repo root:

go-dojo verify 0.5-first-http-hit

This runs the task's go test suite in exercises/phase-0/0.5-first-http-hit/, commits the attempt to .go-dojo/attempts/, and updates your mastery.