Reputation: 33
i have a website python-based that consists of a form that i want to fill from flutter. this form takes one input text field (get request ) when submit is pressed, it will generate an output based on the python script ( it is an natural language processing) is it possible to connect to this website using flutter and fill the form ? i have tried using 'HTTP' package in flutter but i was not able to connect to the form any help will be appreciated i tried the following:
Future<String> sendQuery(query) async{
final http.Response response = await http.get(
'http://127.0.0.1:5000/getQuery/',
headers: <String, String>{
'Content-Type': 'application/json; charset=UTF-8',
},
);
}
Upvotes: 1
Views: 402
Reputation: 909
You can use this plugin navigate to web site https://pub.dev/packages/url_launcher
_launchURL() async {
const url = 'https://flutter.dev';
if (await canLaunch(url)) {
await launch(url);
} else {
throw 'Could not launch $url';
}
}
Upvotes: 1