TJ Asher
TJ Asher

Reputation: 767

Delphi TEdgeBrowser and OnNavigate event POST data

Trying to move from TWebBrowser to TEdgeBrowser.

In a particular use case when a website is redirecting I am capturing the redirect and am also capturing the HTTP POST data and the XML contained therein and making use of the PostData variable in the BeforeNavigate2 method.

In the old TWebBrowser component the BeforeNavigate2 method contains a PostData variable which is of OleVariant:

BeforeNavigate2(ASender: TObject; const pDisp: IDispatch; const URL, Flags, TargetFrameName, PostData, Headers: OleVariant; var Cancel: WordBool);

Trying to move to TEdgeBrowser in Delphi 11 and this PostData is not part of the new NavigationStarting event:

NavigationStarting(Sender: TCustomEdgeBrowser; Args: TNavigationStartingEventArgs);

Also similar arguments when using the WVBrowser wrapper for the WebView2 browser in Delphi 10:

NavigationStarting(Sender: TObject; const aWebView: ICoreWebView2; const aArgs: ICoreWebView2NavigationStartingEventArgs);

Ultimately I am looking for the POST data and cannot find it in the args or in any method.

Does it exist anywhere, and if so, where?

Cheers! TJ

Upvotes: 2

Views: 936

Answers (0)

Related Questions