Skip to content

Commit

Permalink
Fix createHttpClient example in README (#1853)
Browse files Browse the repository at this point in the history
  • Loading branch information
a1573595 authored Jun 6, 2023
1 parent 9c7212b commit 8da2886
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,7 @@ Unlike other methods, this one works with the certificate of the server itself.
void initAdapter() {
const String fingerprint = 'ee5ce1dfa7a53657c545c62b65802e4272878dabd65c0aadcf85783ebb0b4d5c';
dio.httpClientAdapter = IOHttpClientAdapter(
createHttpClient = () {
createHttpClient: () {
// Don't trust any certificate just because their root cert is trusted.
final HttpClient client = HttpClient(context: SecurityContext(withTrustedRoots: false));
// You can test the intermediate / root cert here. We just ignore it.
Expand Down

0 comments on commit 8da2886

Please sign in to comment.