Hello everyone,
I have a little problem concerning the function
WebserviceWriteHTTPCode function (
WebserviceWriteHTTPCode documentation). Basically, after I called the function to set the HTTP code of the response to, let's say, 503, the server sends a response with the following Content-Type header :
text/plain; charset=utf-8. The problem is that I don't want to send a response in plain text, I want the Content-Type to match the format requested by the user. I tried using the
WebserviceWriteMIMEType function, but I think it's getting ignored completely.
Here's my code :
WebserviceWriteMIMEType(typeMimeJSON)
WebserviceWriteHTTPCode(Code, ToJSON())
RESULT ToJSON()
It's actually very simple. This code is part of a Class method and the
ToJSON function simply convert the current Class's instance to JSON.
Thanks in advance for any help !
Anthony Blanchette-Potvin