Hello,
Are there any packages that provides a webview, which can intercept and modify:
1- request sent by the client before it is sent to the server
2- response sent by the server before reaching the client
Regards
Hello,
Are there any packages that provides a webview, which can intercept and modify:
1- request sent by the client before it is sent to the server
2- response sent by the server before reaching the client
Regards
Maybe use Dio interceptors for that?
Something like Dio interceptors with a WebView would be awesome, Afaik Dio doesn’t provide a webview
can you describe what you need to do?
Does the “official” webview package not do this? It can definitely intercept responses sent by the server but maybe not to the level of granularity you’re looking for?
I want to modify add a cookie to the request before it is sent, and preferably modify the response before it reaches the client(to remove some html elements that might include sensitive info)
Do you have an example?
I’ve used the https://pub.dev/packages/flutter_inappwebview package to intercept and modify requests.
It is a very customizable package for this use case.
Hello I made a linkedIn post about that a week a go,
Using this package you get a WebView controller that tracks your redirections, JavaScript events, and exposes multiple callbacks you get to use to listen and control your embedded webview’s behavior,
I have used it to create a custom payment gateway plug-in that does not have a flutter package yet.
I’ll post the link to the post, you can read the article and contact me if you need any further details.
To answer your question specifically, the controller has an " OnRequest" property if I recall it right, which you could use to either choose to forward the request or reject it.
Link to my profile, you LL find the post featured.
It’s quite simple to get an HTTP server on your Flutter app.
Just use it to create a man-in-the-middle attack. Obviously, all certificates will be void.
It's All Widgets! • Flutter Pro • FlutterX • Flutter Streams • Flutter Podcast
Supported by Invoice Ninja - Free Invoicing Software for Small Business [ Demo | Package | Code | Apps ]
Flutter and the related logo are trademarks of Google LLC. We are not endorsed by or affiliated with Google LLC.
Using contents of this forum for the purposes of training proprietary AI models is forbidden. Only if your AI model is free & open source, go ahead and scrape.