Process REST API programming
Each REST API has a schema for the request content. Each parameter
is of type string
, boolean
, or integer
.
The framework tries to parse the client input to the type that is
specified in the schema. For a string
parameter,
values are passed as strings, whether they are a character string,
a Boolean, or a number. For example, the word value is
parsed as the "value"
string, the number 42 is
parsed as the "42"
string, and the Boolean value true is
parsed as the "true"
string. Moreover, for Boolean
and number types, string values that can be parsed as Boolean or numbers
respectively are also accepted. But if a string value is passed and
cannot be parsed to a Boolean or number, a 400 error
is returned. For example, "T" is not a valid
value for a Boolean parameter.