Skip to content
Ameen Abozaid
Planned lessonJNR-022-L03

curl fluency

  • Lesson 3 of 5
  • Junior
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 URL shows status and headers. -X METHOD sets 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 -s for quiet output and -o file to save the body.
Draft outline details

Demonstration

bash
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.

Lab and exercises Quiz

Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.

Continue to next lesson

Type to search levels, phases, modules and lessons.