No Description
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.

resetPassword_post.dart 711B

1234567891011121314151617181920212223242526272829
  1. import 'dart:convert';
  2. import 'dart:core';
  3. import 'package:http/http.dart' as http;
  4. import 'package:hris_selfservice_mobile/constants.dart';
  5. import 'dart:developer' as developer;
  6. class ResetPassword_Post {
  7. late String email;
  8. ResetPassword_Post({required this.email});
  9. static Future<String> connectToAPI(String email) async {
  10. String URL = baseURL + "/api/v1/ask_reset_password";
  11. var sendData = await http.post(Uri.parse(URL), body: jsonEncode({
  12. "data": [
  13. {
  14. "email": email
  15. }
  16. ]
  17. }), headers: {
  18. "Content-Type": "application/json",
  19. "Api-key": apiKey
  20. });
  21. developer.log(sendData.body, name: "sendatabody");
  22. return sendData.body;
  23. }
  24. }