[当我使用Delphi XE8时,我使用以下代码将文本或图像发送到浏览器,而没有JSON值。此代码不再起作用:
服务器代码:
function TTest.GetText: TStream
begin
result := TStringStream.create('test');
end
对于此示例,URL为http://localhost:8080/datasnap/rest/TTest/GetText
使用XE8,结果是:
test
对于10.3.2,结果为:
{"result":[[116,101,115,116]]}
如何禁用JSON结果格式?
谢谢您的帮助!
JP
使用参数json=false
:
http://localhost:8080/datasnap/rest/TTest/GetText?json=false
font:
http://docwiki.embarcadero.com/RADStudio/Rio/en/DBX_Parameter_Caching