TAdvWebBrowser set headers and POST data to URL

I need to set the "Content-Type" header to "application/x-www-form-urlencoded", set the values of some form fields in the request body and POST to a URL.

Using the Delphi TWebBrowser component that is easy because you can do all this from the parameters of the Navigate method.

How do I set request headers and post data using TAdvWebBrowser?

Hi,

In AdvWebBrowser, this is currently not exposed. We are planning on exposing / wrapping more functionality in the coming months and are working on an update for January 2021.

Hi,

Is it now ok?

How do I set request headers and post data using TAdvWebBrowser?

Hi,

Here is a sample on how to achieve this.

Sample.zip (90.4 KB)

1 Like