Using more complex objects with XData

For now, to start with, easiest way is to use Fiddler. Learning to use it is also helpful for any debugging you want to do with TMS Sparkle from Windows. It's much easier and higher-level than WireShark. Never used RawCap. Usually you just need to do this:

  1. Install Fiddler, open it and make sure it's capturing requests (which is on by default when you start it).

  2. Configure WinHttp engine to use automatically use the default proxy.

uses {...}, Sparkle.WinHttp.Engine;

var
  Engine: TWinHttpEngine;
begin
  Engine := TWinHttpEngine(FClient.Engine);
  Engine.ProxyMode := THttpProxyMode.Auto;
  Engine.ResetSession;
end;
  1. Make sure you not access the server using localhost or 127.0.0.1 address otherwise Fiddler will ignore those. Just use, for example, your computer name.

With that you should be able to see exactly the JSON being sent and receive from the server, as well all the HTTP request headers.