Sample code for 30+ languages & platforms
Dart

Require that the Web Server's SSL Certificate is Non-Expired and the Signature is Valid

Demonstrates setting the RequireSslCertVerify property to require that the web server's SSL/TLS certificate is non-expired and that the certificate's signature is valid.

Chilkat Dart Downloads

Dart
import 'package:chilkat/chilkat.dart';

void main() {
  // This example assumes the Chilkat HTTP API to have been previously unlocked.
  // See Global Unlock Sample for sample code.

  final url = 'https://chilkatsoft.com';

  final http = CkHttp();
  http.requireSslCertVerify = true;

  final String html;
  try {
    html = http.quickGetStr(url);
  } on ChilkatException catch (e) {
    print(e.lastErrorText);
    return;
  }

  print('Success.');
}