NavigateWithWebResourceRequest headers : --> to do (sorry) - Printable Version +- Antwise community forums (https://forums.antwise.com) +-- Forum: Antview (https://forums.antwise.com/forumdisplay.php?fid=11) +--- Forum: Antview for Windows (https://forums.antwise.com/forumdisplay.php?fid=12) +--- Thread: NavigateWithWebResourceRequest headers : --> to do (sorry) (/showthread.php?tid=139) |
NavigateWithWebResourceRequest headers : --> to do (sorry) - ssagodi - 2022-11-16 Hi, the documentation for the NavigateWithWebResourceRequest says headers : --> to do (sorry). I wanted to confirm that this means anything specified in the headers paramater is not being passed. Is there an eta on when this might be implemented ? thanks, Steve RE: NavigateWithWebResourceRequest headers : --> to do (sorry) - wila - 2022-11-16 Hi Steve, Sorry about that. It is the documentation that is missing, the feature itself has actually been implemented in the currently published version. But without the documentation on how-to use that, it is anyones guess I suppose. One could go and look at how this works in WebView2, but that's not always the full answer either. The documentation has been written and we're working on a new release. Below I have copied the content here so that you don't have to wait on that release as I do not yet have an ETA. Let me know if there's any more questions. Hope this helps, -- Wil 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" |