request body
The main content of an HTTP request or response, such as a JSON object describing an order to create.
In more detail
Bodies carry structured input for creation or replacement, and the response body carries the result. A body can have a valid shape and still break a business rule, so parse it into an explicit model and then validate it.
Related terms
- response model — A type, often a record, that describes exactly the data an API accepts or returns, separate from database entities.
- request binding — A framework converting parts of an HTTP request, such as path variables, query parameters, headers and the body, into typed method arguments.
- JSON — A simple text format for structured data made of keys, values, lists and nested objects.
- mass assignment — A bug where a handler copies every field of a request body into a data model, so a caller can set fields such as role or balance that were never meant to be writable.
- untrusted input — Any data a program did not create itself, including arguments, form fields, request bodies, file contents, file names and environment variables.
Taught in
- Reading The Request — Modern Java: Virtual Threads & High-Throughput Services
- Validation — Modern Java: Virtual Threads & High-Throughput Services
- Authentication Versus Authorisation — Application Security & Threat Modeling for Engineers
- Mass Assignment — Application Security & Threat Modeling for Engineers