This code has been working fine but since I upgraded to the latest versions of XData (5.10), WebCore (2.050) etc., I'm now getting an exception. Here is the code snippet:
var
Response: TXDataClientResponse;
data : WideString;
begin
try
Response := await(XDataWebClient1.RawInvokeAsync('IFinDataService.GetVPtns', []));
if response.StatusCode <> 200 then
...
else
data := Response.ResponseText; //errors on this line
....
except
.....
end;
A few things
- The compiler does not like the RawInvoke: Incompatible types: 'TXDataClientResponse' and 'TJSValue' but it runs
- I can view JSON by invoking the webservice from the browser and it's fine
- This is the error from the console:
XData.Web.Response.pas:118 Uncaught (in promise) DOMException: Failed to read the 'responseText' property from 'XMLHttpRequest': The value is only accessible if the object's 'responseType' is '' or 'text' (was 'blob').
Thank you