Validate HTTP API user input

For example, raft indices must be sane integers.
can we put then in one line like`{mustNewRequest(...)}`?