updateProfile function

Future<String> updateProfile({
  1. required String apiKey,
  2. required Map body,
})

Implementation

Future<String> updateProfile(
    {required String apiKey, required Map body}) async {
  var url = Uri.https(baseUrl, '/api/profiles/profile');
  var response = await http.put(
    url,
    headers: {
      'Authorization': 'Bearer $apiKey',
      'Content-type': 'application/json'
    },
    body: json.encode(preProcess(body)),
  );
  return response.body;
}