Set statuscode exposing REST API

Set statuscode exposing REST API


For a customer i'm exposing a REST interface within Outsystems. The platform version is based on Java. I'm setting the http statusCode using the SetStatusCode Action from the  HTTPRequestHandler extension. This works fine for almost all statusCodes, except 204 (No content) If i set the statuscode on 204, the client which is consuming the REST api gets statuscode 200. I'm using the HTTP method 'GET'.

Very easy to reproduce because it's behaviour is every time the same.

Any suggestions on how i can fix this/work around it?

Hello Pascal. 

There is an issue with the interaction of the platform and the underlying Java library (Jersey) regarding the 204 status code. If you upgrade to version 9.1 or above, you can add an OnResponse callback to workaround it (just adding the callback will solve the problem).