reportProblem method
Implementation
Future<http.Response> reportProblem(
String authCode,
String sessionId,
String deviceId,
String stationId,
String problem,
String description) async {
var jsonBody = {
"auth_code": authCode,
"session_id": sessionId,
"device_id": deviceId,
"station_id": stationId,
"problem": problem,
"description": description
};
var url = Uri.parse(APIConst.reportProblem);
Map<String, String> headers = {
"Content-type": "application/x-www-form-urlencoded",
'Accept': 'application/json'
};
//print('REQUEST ::: ' + json_body.toString());
return await http
.post(url, headers: headers, body: jsonBody)
.timeout(Duration(seconds: timeOutSecond));
}