postFootprint method
Post footprint event for tracking user journey
Implementation
Future<ModelFootprintResponse> postFootprint(String event) async {
_ensureAuthenticated();
try {
final response = await http.post(
Uri.parse('$_currentBaseUrl${ApiConstants.footprintEndpoint}'),
headers: _buildHeaders(_authToken!),
body: jsonEncode({'event': event}),
);
final data = jsonDecode(response.body);
return ModelFootprintResponse.fromJson(data);
} catch (e) {
print('Footprint error: $e');
rethrow;
}
}