1234567891011121314151617181920212223242526272829 |
- 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;
-
- class ResetPassword_Post {
- late String email;
-
- ResetPassword_Post({required this.email});
-
- static Future<String> connectToAPI(String email) async {
- String URL = baseURL + "/api/v1/ask_reset_password";
-
- var sendData = await http.post(Uri.parse(URL), body: jsonEncode({
- "data": [
- {
- "email": email
- }
- ]
- }), headers: {
- "Content-Type": "application/json",
- "Api-key": apiKey
- });
-
- developer.log(sendData.body, name: "sendatabody");
- return sendData.body;
- }
- }
|