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.
 
 
 
 
 

40 lines
1.0 KiB

import 'dart:convert';
import 'dart:core';
import 'package:http/http.dart' as http;
import 'package:employee_selfservice_mobile/constants.dart';
import 'dart:developer' as logDev;
class LoginStatus_Post {
late String version;
late String device;
late String session;
late String notif_token;
LoginStatus_Post({
required this.version,
required this.device,
required this.session,
required this.notif_token});
static Future<String> connectToAPI(String version, String device, String session, String notif_token) async {
String URL = baseURL + "/api/v1/login_status";
print(URL);
var sendData = await http.post(Uri.parse(URL),
body: jsonEncode({
"data": [
{
"version": version,
"device": device,
"session": session,
"notif_token": notif_token
}
]
}),
headers: {"Content-Type": "application/json", "Api-key": apiKey});
logDev.log(sendData.body, name: "Login Status");
return sendData.body;
}
}