If anyone is interested, I've worked out the basics. I use httpsend (part of Synapse) to download the web page as a stream, and copy it to the TFrameBrowser stream. The following code works with a very simple page:
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics,
Dialogs, StdCtrls, ExtCtrls, Buttons, FramBrwz, htmlview, httpsend;
type
{ TForm1 }
TForm1 = class(TForm)
BitBtn1: TBitBtn;
FrameBrowser1: TFrameBrowser;
procedure BitBtn1Click(Sender: TObject);
procedure FrameBrowser1GetPostRequestEx(Sender: TObject; IsGet: boolean;
const URL, Query, EncType, Referer: string; Reload: boolean;
var NewURL: string; var DocType: ThtmlFileType; var Stream: TMemoryStream
);
private
{ private declarations }
public
{ public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.BitBtn1Click(Sender: TObject);
begin
FrameBrowser1.LoadURL(<Remote URL>);
end;
procedure TForm1.FrameBrowser1GetPostRequestEx(Sender: TObject; IsGet: boolean;
const URL, Query, EncType, Referer: string; Reload: boolean;
var NewURL: string; var DocType: ThtmlFileType; var Stream: TMemoryStream);
var
S: string;
N: Integer;
HTTPClient: THTTPsend;
begin
S := URL;
N := Pos('http://', S);
if N = 1 then //Remove prefix
begin
S := S[8..Length(S)];
end;
Stream := TMemoryStream.Create;
HTTPClient := THTTPSend.Create;
HTTPClient.Timeout := 5000;
try
if HTTPClient.HTTPMethod('GET', S) then
begin
Stream.CopyFrom(HTTPClient.Document, HTTPClient.Document.Size);
end;
finally
HTTPClient.Free;
end;
end;
end.