skip to Main Content

Flutter/dart – Connection failed

I created the simplest GET (spring boot backend) imaginable: [...] @GetMapping("basic") @ResponseBody public void basic2() { System.out.println("basic get invoked"); } [...] I'm trying to create a flutter mobile app client for this. I can invoke it via curl and I…

VIEW QUESTION

How to send http request in flutter

session.post( 'http://myopencart.example.com/index.php?route=api/cart/add', params={'api_token':'768ef1810185cd6562478f61d2'}, data={ 'product_id':'100' 'quantuty':'1' } ) How to I post this in flutter. In this api there is two type of data to be posted. I need solution for this I didn't tried yet.

VIEW QUESTION

Flutter – Expected an identifier and Expected to find ')' error

I am beginner coder and i dont understand how to resolve this error Future<http.Response> fetchData(String query) async { return http.post( Uri.parse('https://laravelsyd-fypfinalver.herokuapp.com/getBusService'), headers: <String, String>{ 'Content-Type': 'application/json; charset=UTF-8', }, body: { jsonEncode({'bus_stop_id': busCode}) }, if (response.statusCode == 200) { final List<dynamic>…

VIEW QUESTION
Back To Top
Search