Diagnose an HTTP API from the command line

8 steps · about 1 h 56 min · Intermediate

  1. Read the response beyond its body (article, curl, 18 min)

    Select output, header and status options from curl's command reference.

  2. Follow and inspect redirects (article, curl, 14 min)

    Reproduce HTTP exchanges and redirects as a scriptable sequence.

  3. Send explicit request headers (article, curl, 18 min)

    Build requests with deliberate methods, headers and payloads.

  4. Reproduce a request body (article, Everything curl, 14 min)

    Choose the correct form, JSON or raw-body mechanism.

  5. Trace the protocol conversation (article, Everything curl, 12 min)

    Expose connection, TLS and header details while keeping secrets redacted.

  6. Investigate TLS verification (article, curl, 14 min)

    Distinguish certificate and protocol failures without disabling safety casually.

  7. Recognise common connection failures (article, curl, 14 min)

    Use known failure patterns to narrow a hang or unexpected response.

  8. Interpret curl failure codes (article, curl, 12 min)

    Preserve and explain curl's failure signal in a repeatable diagnostic command.