0
votes

I tried to set HTTP status code in response message in a custom mediator as followed

<property name="HTTP_SC" value="400" scope="axis2"/>

But in the response I got this status line

HTTP/1.1 400 OK

Is there anything else I need to do to get the correct HTTP status message which align with the HTTP status code.

I am using WSO2 API Manager 2.0.0

Thank you very much.

1

1 Answers

0
votes

After dumping all properties in axis2 context, I found that I have to remove a property called 'HTTP_SC_DESC' to have HTTP status description correctly set

<property name="HTTP_SC_DESC" scope="axis2" action="remove"/>

After that I got correct HTTP status description

HTTP/1.1 400 Bad Request