Repository navigation
|
Hi! Which is the best practice to change the return HTTP code? I am aware of manipulating it in the interceptors, but is there better way? Changing the message return code or something like this? Can you give me a direction where to search for the best option? |
Replies: 2 comments
|
Hi @cj19, thanks for an interesting exscecise! I have added a test demoing two ways to do that:
I hope that's enough. There might be other ways. |
|
Hi @ppalaga, thanks for your response! For some reason,
not sure this is the best way, though. Thank you for your quick response and for the the valuable examples! |
Hi @cj19, thanks for an interesting exscecise!
I have added a test demoing two ways to do that:
Faulthttps://github.com/quarkiverse/quarkus-cxf/pull/2079/changes#diff-cee703929af376cf9b56fd0bef7aedf5c66284f96d8921cfaaea6fa670824310R22-R25message.put(Message.RESPONSE_CODE, 401)in an Interceptor: https://github.com/quarkiverse/quarkus-cxf/pull/2079/changes#diff-dc58e3796413f7fdfa9b4a65e0542d29add0ec4c848dd46a4fcdf4faa0cf7bcfR16-R35See also https://docs.quarkiverse.io/quarkus-cxf/dev/user-guide/interceptors-features-handlers/cxf-interceptors-and-features.html for wiring interceptors
I hope that's enough. There might be other ways.