XDataClient access other server

Hello,

I have tried the trial version for several days by trying several examples. I tried this sparkle with references from the available demo.
   

 procedure TForm1.DoRequest;
    var
      Req: THttpRequest;
      Resp: THttpResponse;
      JSONOB : TJSONObject;
      JSONVL: TJSONValue;
      Info: THttpHeaderInfo;
    begin
      Resp := nil;
      Req := FClient.CreateRequest;
      try
        // set uri
        Req.Uri := 'http:/........';

        // set request method
        Req.Method := 'POST';

        // set content body, if available. Use UTF8 as default encoding,
        // we will not worry about this in this simple demo
        JSONOB := TJSONObject.Create();
        JSONOB.AddPair('id', TJSONNumber.Create(0));
        Req.SetContent(TEncoding.UTF8.GetBytes(JSONOB.ToJSON));
        Req.Headers.SetValue('content-type', 'application/json');

        // perform request
        Resp := FClient.Send(Req);

        for Info in Resp.Headers.AllHeaders do
        begin
          memo1.Lines.Add(Info.Name+':'+Info.Value);
        end;

        JSONVL := TJSONObject.ParseJSONValue(TEncoding.UTF8.GetString(Resp.ContentAsBytes));
        try
          memo1.Lines.Add(REST.Json.TJson.Format(JSONVL));
        finally
          JSONVL.Free;
        end;
      finally
        Req.Free;
        Resp.Free;
        JSONOB.Free;
      end;
    end; 


can it be done using xdataclient, I haven't gotten the reference yet.

That's how you should use it. THttpClient from Sparkle is the generic HTTP client to access any HTTP server. 

TXDataClient is specific to XData server, as it relies on XData convention and is type safe, i.e., it retrieves interfaces and methods from XData server, for example.
it seems like what I think is right if xdataclient is specific to servers made with xdataserver.
Thank you Wagner..