TypeScript Developer

Case File: Never Trust the Body

Accept new parcels with POST /parcels, validate the JSON body before it goes anywhere near the data, and answer 400 naming every wrong field, in alphabetical order, whether the body was missing a field, wrong, not JSON or not an object. Real Request objects drive your handler. Real TypeScript, generated for you alone.

55 min

Case File: Never Trust the Body

Accept new parcels with POST /parcels, validate the JSON body before it goes anywhere near the data, and answer 400 naming every wrong field, in alphabetical order, whether the body was missing a field, wrong, not JSON or not an object. Real Request objects drive your handler. Real TypeScript, generated for you alone.

In this lesson:

  • typescript
  • api
  • validation
  • post
  • json
  • status-codes
  • security
  • case-file

๐Ÿ”’ This lesson is part of a paid plan

This lesson is part of the Pro plan. Upgrade to unlock the full lesson, the labs and the exam.

Upgrade Now

This lesson is part of a paid plan

Upgrade to Pro to unlock this course, its labs and its exam.

View Pricing Plans