We break down how to properly build an HTTP request in Go using
http.NewRequestWithContext: why a request needs
context.Context (timeouts, deadlines, cancellation), how to safely form
query params via
net/url instead of string concatenation, and how to set the
Accept,
Content-Type,
User-Agent headers before calling
client.Do(req). At the end, there is a request assembly diagram (mermaid) and a set of common mistakes.