Untitled

 avatar
unknown
dart
3 years ago
834 B
4
Indexable
  static String versionURL = "${GlobalV.mainURL}:9895";
  static const String authUsername = 'cPxA9!43';
  static const String authPassword = '8?17Px17A';
  static final String basicAuth =
      'Basic ' + base64Encode(utf8.encode('$authUsername:$authPassword'));

    static Future<bool> versionControl(type, version) async {
    print("Platform Type: $type, Version: $version");
    Response r = await post(
      Uri.http(url, "api/Mobile/MobileVersion"),
      headers: <String, String>{'authorization': basicAuth},
      body: {
        'Type': type,
        'Version': version,
      },
    );
    print(r.body);
    if (r.body.contains('"MobileVersionResult":true')) {
      print("Versiyon Doğrulama Başarılı");
      return true;
    } else {
      print("Versiyon Doğrulama Başarısız");
      return false;
    }
  }
Editor is loading...