System.Text.UTF8Encoding encoder;
RetailWebResponse response;
RetailCommonWebAPI webApi;
str res;
str _Fdate = DateTimeUtil::toFormattedStr(StartDateTime, 321,
DateDay::Digits2,DateSeparator::Hyphen,
DateMonth::Digits2,DateSeparator::Hyphen,
DateYear::Digits4, TimeSeparator::Colon, TimeSeparator::Colon, DateFlags::None);
str _Tdate = DateTimeUtil::toFormattedStr(StartDateTime, 321,
DateDay::Digits2,DateSeparator::Hyphen,
DateMonth::Digits2,DateSeparator::Hyphen,
DateYear::Digits4, TimeSeparator::Colon, TimeSeparator::Colon, DateFlags::None);
//str url = strFmt('http://Dev-SAG-App:5555/gateway/AttendanceAPI/1.0/Attendance?StartDate=%1&EndDate=%2',_Fdate, _Tdate);
str url = strFmt(HRMParameters::find().AttendanceUrl,_Fdate, _Tdate) ;
info(url);
info(HRMParameters::find().GatewayAPIKey);
RetailWebRequest webRequest = RetailWebRequest::newUrl(url);
webApi = RetailCommonWebAPI::construct();
webRequest.parmMethod('GET');
webRequest.parmHeader('x-Gateway-APIKey: ' + HRMParameters::find().GatewayAPIKey);
webRequest.parmContentType('application/json');
response = webApi.getResponse(webRequest);
if (response.parmHttpStatus() == 200)
res = response.parmData();
Comments