achref_tdiscount Posted January 7, 2020 Share Posted January 7, 2020 class _HomePageState extends State<HomePage> { Future<String> getData () async{ http.Response response = await http.get( ("http://localhost/prestashop/api/products/1?output_format=JSON"), headers: { "Authorization": basicAuthenticationHeader('EZH8CRBMY6W791QE8Y1IBMZUN9R56A7X', ''), "Accept" :"application/json", } ); } @override Widget build(BuildContext context) { return new Scaffold( body: new Center( child: new RaisedButton( child: new Text("Get data"), onPressed: getData, ), ), ); } } 1 Link to comment Share on other sites More sharing options...
Joël Gaujard Posted May 18, 2020 Share Posted May 18, 2020 Hello @achref_tdiscount Did you succeed ? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now