postRequest method
common POST request call
Implementation
Future<dynamic> postRequest(String path, Map<String, String?> data) async {
Uri url = Uri.https(AtOnboardingConstants.apiEndPoint, path);
String body = json.encode(data);
return _http.post(
url,
body: body,
headers: <String, String>{
'Authorization': AtOnboardingConstants.apiKey!,
'Content-Type': 'application/json',
},
);
}