Quite confused. Header 'Content-Type' should be replaced by FormPost method, why Clear is required? Will it impact my cookies settings (eg. the 'login' thing) produced by the first request?
Well apparently it does not get replaced by FormPost. I did not study how FormPost works internally, but you can find out by debugging the code.
TW: How to stepping in the source code of TFPHTTPClient when debugging?...Really recompile it with debug info?
Ideally you should recompile FPC with debug info, however in this particular case there is a shortcut. Just copy fphttpclient.pp from
$(FPCDir)\source\packages\fcl-web\src\base\ to your project folder and you're good to go.