NavigateWithWebResourceRequest
Interface AntView
Type: Method
Parameters: String uri String method String postData String headers
Returns: nothing
Use this navigation to create a custom navigation.
This method internally creates a custom WebResourceRequest object that is then passed to the uri on your behalf.
uri has the full URL of the resource you want to access, including the protocol.
Example:
uri = "https://www.whatismybrowser.com/detect/what-http-headers-is-my-browser-sending?sort=dont-sort"
Allowed methods: "GET"/"POST"
postData will only be send if the method is "POST" and the url scheme starts with either http or https.
If you need to pass form data in the postData then you add it as a standard url encoded scheme. AntView does not url encode the data for you.
Example in DataFlex:
Move "https://tryphp.w3schools.com/demo/demo_form_validation_escapechar.php" to sURL
Move "Content-Type: application/x-www-form-urlencoded\r\n" to sHeaders
Move "name=Pete&email=test@example.com&website=www.example.com&comment=This%20is%20some%20comment." to sText
Send ComNavigateWithWebResourceRequest of oEdgeWebBrowser sURL "POST" sText sHeaders
headers : You can add multiple headers, the way to seperate those is with carriage return, linefeed written as "\r\n"
Example:
Headers = "Referer: https://example.com/\r\nDnt: 1\r\n"
or
Headers = "Content-Type: multipart/form-data\r\n"
AntView - The MS Edge WebView2 ActiveX control Date last changed: 09/30/2024