Hi everybody,
I'm modifying a REST interface for a client but it seems impossible to me to modify HTTP Response Status and including custom HTTP Headers either.
My dispatch class (extending %CSP.REST) is contacted through a POST request and the latter is processed in a custom class (extending %CSP.REST as well) accessed as shown in the example below:
<Route Url="/test" Method="POST" Call="Custom.Test:Process" />
Within the processing class I tried executing the following statements with no success:
Do %response.SetHeader("totalcount",totalcount)
Set %response.Status = ..#HTTP400BADREQUEST
The following message is always returned, even if an error occurred:
.png)
Moreover, I tried to print %response.Status just before the end of the code in the processing class and it seems to have the right value ("400 Bad Request"), even it is always 200 within the response.
Finally, I tried adding a custom header with no success, again. I tried with "x-totalcount" also, as a user suggested in another question but it haven't worked.
Can somebody help me?
Thanks