Bummer! This is just a preview. You need to be signed in with an account to view the entire instruction.
Well done!
You have completed REST API Validation with Express!
You have completed REST API Validation with Express!
Instruction
Further Testing the New User Account Route
When we initially tested the POST /api/users route, the request's body content looked similar to the following object:
{
"name": "Joe Smith",
"email": "joe@smith.com"
}
But what happens if we supply a name value only?
{
"name": "Anwar Montasir"
}
We still receive a 201 Created HTTP status code from the server:
And what happens if we don't supply any values?
{}
We still receive...