Networking & HTTP·Networking from DNS to production

Debugging requests

Use curl, DevTools and logs to locate the failing layer.

Beginner 14 min read Lesson 7 of 300 Challenge included
What you will be able to do
  • Use curl -v for headers and connection details.
  • Use the Network panel for timing and payloads.
  • Reproduce with the smallest possible request.
  • Compare working and failing requests.

In plain English

Debugging a request means separating DNS, connection, TLS, request, response and application. curl shows the transport; DevTools shows the browser view; server logs show the application. Find the first layer that is wrong.

terminalTerminal
curl -sS -D - -o /dev/null https://example.com/api/courses
curl -sS -X POST -H 'Content-Type: application/json' -d '{"name":"Ada"}' https://example.com/api/users
Your turn

Send JSON

Easy

Write a curl POST with a JSON body and the correct Content-Type.

BASH · starter
curl -X POST
Check your understanding before moving on.
Knowledge checkQuestion 1

Which curl flag prints response headers?

Select an answer to continue
Study tools

Make it yours.

Keep a private note for this lesson, then turn the key ideas into flashcards you can revisit.

Sign in to save notes and flashcards.Both are private to your account and stay with your progress.
Sign in
Finished reading?

Lock in what you just learned.

Mark this lesson complete to save your place and move one step closer to the certificate.

Next: REST and status codes
Lesson 7 of 300 · 0% of course