I am trying to create a proxy server that accesses a third-party API, but their development endpoint has a certificate error. Is there any way around the ssl error when using http.dart?
import 'package:http/http.dart' as http; Uri url = Uri.parse("https://url-with-ssl-error.com/endpoint"); http.get(url).then((response) => print(response.body));
and an error is returned here:
Uncaught Error: SocketIOException: RawSecureSocket error (Unexpected handshake error in client) (OS Error: errno = -8172) Unhandled exception: SocketIOException: RawSecureSocket error (Unexpected handshake error in client) (OS Error: errno = -8172) #0 _FutureImpl._scheduleUnhandledError.<anonymous closure> (dart:async/future_impl.dart:207:9) #1 Timer.run.<anonymous closure> (dart:async/timer.dart:17:21) #2 Timer.run.<anonymous closure> (dart:async/timer.dart:25:13) #3 Timer.Timer.<anonymous closure> (dart:async-patch:15:15) #4 _Timer._createTimerHandler._handleTimeout (dart:io:6990:28) #5 _Timer._createTimerHandler._handleTimeout (dart:io:6998:7) #6 _Timer._createTimerHandler.<anonymous closure> (dart:io:7006:23) #7 _ReceivePortImpl._handleMessage (dart:isolate-patch:81:92)
source share