GSI - Employe Self Service Mobile
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

34 lines
903 B

import 'dart:convert';
import 'dart:core';
import 'package:http/http.dart' as http;
import 'package:employee_selfservice_mobile/constants.dart';
import 'dart:developer' as developer;
import 'package:shared_preferences/shared_preferences.dart';
class CheckStatus_Post {
late String session;
CheckStatus_Post({required this.session});
static Future<String> connectToAPI() async {
String URL = baseURL + "/api/v1/check_status";
final SharedPreferences prefs = await SharedPreferences.getInstance();
final session = prefs.getString('session');
var sendData = await http.post(Uri.parse(URL), body: jsonEncode({
"data": [
{
"session": session
}
]
}), headers: {
"Content-Type": "application/json",
"Api-key": apiKey
});
//developer.log(sendData.body, name: "Get Status Absensi Result");
return sendData.body;
}
}