2

I have a problem when I make a http request to the server when I post on flutter it returns NO_RENEGOTIATION(ssl_lib.cc:1725) error 268435638 error, but when I try to use postman it works fine.

I've equated all the headers with postman, replaced Jcenter() with MavenCentral() and it doesn't work

This is the code I use:

   final Map<String, dynamic> requestData = {
            "email": Encryption().encryptKey(email),
            "password": Encryption().encryptKey(password),
            "user_ad": userType,
            "token_fcm": _tokenFcm,
            "is_encrypted": true,
          };

          Response response = await _dio.post(
            "$basePath/login",
            data: FormData.fromMap(requestData),
            options: Options(
              headers: {
                "Connection": "keep-alive",
                "Accept": "*/*",
                "Accept-Encoding": "gzip, deflate, br",
                "Host": "btnsmartdev.btn.co.id",
                "Content-Type": "application/json",
                "Cache-Control": "no-cache",
                "Content-Length": "173"
              },
              validateStatus: (status) {
                print("INI STATUS");
                print(status);
                  return (status ?? 0) < 500;
                  },
              followRedirects: false,
            )
          );

          final data = response.data;

Here's what I get in terminal:

Terminal Log

Here's the request from postman:

Postman Request

My Car
  • 4,198
  • 5
  • 17
  • 50
  • The problem is related to allowLegacyUnsafeRenegotiation [It has been answered here](https://stackoverflow.com/a/75262997/14208424) – ALNAJJAR Jan 29 '23 at 10:02

0 Answers0