curl fluency
On This Lesson 4 topics
This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.
In this lesson
call any endpoint from the terminal.
Planned topics
curl -i URLshows status and headers.-X METHODsets the method.-H 'Name: value'adds a header.-d '...'sends a body.- JSON needs
-H 'Content-Type: application/json'. - Quote carefully; on Windows PowerShell quoting differs (verify before recording).
- Use
-sfor quiet output and-o fileto save the body.
Draft outline details
Demonstration
curl -i -X POST http://localhost:8080/products \
-H 'Content-Type: application/json' \
-d '{"name":"Pen","priceCents":150}'Check your understanding
Which flag shows the status line and headers?
Show answer
-i.
Practice
Apply this lesson with the module's lab, exercises and quiz.
Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.