I have the following situation:
When someone calls my Restful-Service Apache the Apache isis code is predifened accordingly to the request. If you miss some parameters you will get a 400 - Bad Request
. Otherwise when all parameters are given you will usually get a 200 - OK
. But sometimes I want to response a 201 - Created
or 202 - Accepted
.
I didn't find a solution for this problem in the Apache ISIS documentation, and I didn't find a code example in the www.
So could anyone help me here?
Thanks
Edit:
I found this url https://github.com/apache/isis/blob/master/core/viewer-restfulobjects-server/src/main/java/org/apache/isis/viewer/restfulobjects/server/resources/DomainServiceResourceServerside.java
.
There static methods from the Responses
class is used to create some 2xx statuses, but only 200 - OK
and 204 - No Content
could be created within this class. For all other non-2xx status codes a RestfulObjectsApplicationException
is thrown.
Is this the right way to respond http codes to the caller?
And how can i respond for example a 202 status code?