XDataClientResponse Stopped Working

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

  1. The compiler does not like the RawInvoke: Incompatible types: 'TXDataClientResponse' and 'TJSValue' but it runs
  2. I can view JSON by invoking the webservice from the browser and it's fine
  3. 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

Maybe this will help... There was a breaking change around XData 5.8 that might relate to your Response.ResponseText error.

1 Like

Excellent! that did it. Thanks

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.