Dartpad make request with basic auth

Issue How to make a basic auth request against httpbin.org/basic-auth using http.get() works http.Request() fails with dartpad. This is my dartpad-demo-code What is working Using get() finally works import ‘dart:convert’ as convert; import ‘package:http/http.dart’ as http; void main(List<String> arguments) async

Continue reading

Getting Specific Header value from Head call response in Flutter

Issue I am performing Head call as below using http: Future<void> fetchModifiedDate(String fileUrl,BuildContext context) async{ if (await checkNetworkConnection(context)) { var responseValue = []; var response = http.head(Uri.parse(fileUrl)); response.then((value) { responseValue = value.headers.values.toString().split(","); modifiedDate = responseValue[1].trim(); print(value.headers.toString()); print(value.headers.values.toString()); }); } The

Continue reading

Getting Specific Header value from Head call response in Flutter

Issue I am performing Head call as below using http: Future<void> fetchModifiedDate(String fileUrl,BuildContext context) async{ if (await checkNetworkConnection(context)) { var responseValue = []; var response = http.head(Uri.parse(fileUrl)); response.then((value) { responseValue = value.headers.values.toString().split(","); modifiedDate = responseValue[1].trim(); print(value.headers.toString()); print(value.headers.values.toString()); }); } The

Continue reading