Http: Support for SSL pinning or SecurityContext

Created on 7 Jan 2019  路  4Comments  路  Source: dart-lang/http

Couldn't find a way to add support for SSL pinning or SecurityContext, is it possible to add?

Most helpful comment

SecurityContext is only available in dart:io. This package is cross-compatible with dart:html. If you need more precise control over security you should use dart:io directly.

Note that you can construct an IOClient from this package with any HttpClient from dart:io if you need something that fits this interface to pass to other code. That client can be constructed with a SecurityContext argument.

https://pub.dartlang.org/documentation/http/latest/io_client/IOClient/IOClient.html

All 4 comments

SecurityContext is only available in dart:io. This package is cross-compatible with dart:html. If you need more precise control over security you should use dart:io directly.

Note that you can construct an IOClient from this package with any HttpClient from dart:io if you need something that fits this interface to pass to other code. That client can be constructed with a SecurityContext argument.

https://pub.dartlang.org/documentation/http/latest/io_client/IOClient/IOClient.html

Ah, missed that. Thanks!

I'm sorry, but how do I import IOClient?

I'm sorry, but how do I import IOClient?

import 'package:http/io_client.dart';

Was this page helpful?
0 / 5 - 0 ratings