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

how can I make an Ajax call instead of post printing the waybill from WordPress on my php website?

<form id="print-shipping-label-form"> <input type="hidden" name="shipping_id" value="<?php echo $result_wpid_shipping['ID']; ?>"> <input type="hidden" name="api_key" value="ce312203c06e8bda7157c408fbac54c4"> <button type="submit" class="btn btn-danger">Drukuj list przewozowy</button> </form> <script> document.addEventListener('DOMContentLoaded', function() { var printShippingLabelForm = document.getElementById('print-shipping-label-form'); if (printShippingLabelForm) { printShippingLabelForm.addEventListener('submit', function(event) { event.preventDefault(); // Zatrzymaj domyślne zachowanie formularza…

VIEW QUESTION
Back To Top
Search