getDongle method
Implementation
Future<http.Response> getDongle(String authCode, String nfcDeviceName) async {
//print('AUTH CODE :: ' + authCode);
var jsonBody = {"auth_code": authCode, "nfc_device_name": nfcDeviceName};
var url = Uri.parse(APIConst.getDongle);
Map<String, String> headers = {
"Content-type": "application/x-www-form-urlencoded",
'Accept': 'application/json'
};
log('GET_DONGLE_REQUEST ::: $url :: $jsonBody');
return await http
.post(url, headers: headers, body: jsonBody)
.timeout(Duration(seconds: timeOutSecond));
}