markBellClicked method
dynamic
markBellClicked(
- dynamic config
Implementation
markBellClicked(dynamic config) async {
const String route = '/bell-clicked/';
final date = utcNow();
final body = jsonEncode(<String, dynamic>{
"time": epochNow(),
"distinct_id": config["distinctId"],
"subscriber_id": config["subscriberId"]
});
final signature = createSignature(
workspaceSecret: config["workspaceSecret"],
route: route,
date: date,
method: "POST",
body: body,
contentType: "application/json; charset=utf-8");
final urlIs = Uri.parse(config["apiUrl"] + route);
final response = await http.post(urlIs, body: body, headers: {
"Authorization": "${config["workspaceKey"]}:$signature",
'Content-Type': 'application/json; charset=utf-8',
'x-amz-date': date,
});
return response;
}