getNearbyPumps method
Implementation
Future<http.Response> getNearbyPumps(String authCode) async {
//var url = Uri.parse(APIConst.LOGN_URL);
//print('AUTH CODE :: ' + authCode);
var jsonBody = {
"latitude": "39.9595",
"longitude": "-75.1871",
"auth_code": authCode,
};
var url = Uri.parse(APIConst.nearByPumps);
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));
}