I/flutter ( 7701): {name: mayank, password: mayank12} E/flutter ( 7701): [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: HandshakeException: クライアント (OS でのハンドシェイク エラー)エラー: E/flutter (7701): CERTIFICATE_VERIFY_FAILED: ローカル発行者証明書を取得できません (handshake.cc:354)) E/flutter (7701):
import 'package:http/http.dart' as http;
import 'dart:convert';
import '../model/login_model.dart';
class APIService {
Future<LoginResponseModel> login(LoginRequestModel requestModel) async {
String url = "https://logistics.hub.com/mobile/req/staff-login/";
final response = await http.post(url, body: jsonEncode(requestModel.toJson()),headers: {"content-
type":"application/json"});
print(response.body);
if (response.statusCode == 200 || response.statusCode == 400) {
return LoginResponseModel.fromJson(
json.decode(response.body),
);
} else {
throw Exception('Failed to load data!');
}
}
}