[Lazarus] TExtJsJSonDataFormatter set ContentType

Michael Van Canneyt michael at freepascal.org
Fri Oct 22 21:38:11 CEST 2010



On Fri, 22 Oct 2010, Leonardo M. Ramé wrote:

> I found TExtJsJsonDataFormatter has a protected method GetDataContentType that returns 'text/html'.
>
> How can I change that value without inheriting from this class? I want
> to return 'text/json;charset=iso-8859-1'.

Currently you can't. I can implement a property for this, and if it's empty, return text/html.

You should be careful what you return here. Not all types are accepted for some reason.

Michael.


More information about the Lazarus mailing list