As a Model API developer, I would like to be able to control the HTTP response code

dan.stern
Member, Moderator, Domino Posts: 36 mod
There are cases where we would would like to have our code (Python or R) decide which HTTP status code to return.
Perhaps we want to use 400 if a user sends an invalid object to the API, for example.
EXAMPLE IMPLEMENTATION: As a Model API developer, if I return a dictionary with a key of "_status_code" from 200-299 or 400-599, that status code will be used.
Tagged:
0