Debugging requests
Use curl, DevTools and logs to locate the failing layer.
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.
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/usersYour turn
EasySend JSON
Write a curl POST with a JSON body and the correct Content-Type.
BASH · starter
curl -X POSTCheck 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 inFinished reading?
Lock in what you just learned.
0%
Mark this lesson complete to save your place and move one step closer to the certificate.