Use the http package post() function to make a POST request.
import 'package:http/http.dart' as http; main() async { var url = 'http://httpbin.org/post'; var response = await http.post(url, body: 'name=doodle&color=blue'); print("Response status: ${response.statusCode}"); print("Response body: ${response.body}"); }
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did129494