sendUserRequest function
Implementation
Future<http.Response> sendUserRequest(
UserRequest userRequest,
String token,
) async {
Debug.print("UserRequest: ${jsonEncode(userRequest)}");
final uniqueId = await PerceptFlutterPlatform.instance.getUniqueID();
final headers = authHeaders(token, uniqueId);
final request = http.post(
Uri.parse(sendUserUrl),
headers: headers,
body: jsonEncode(userRequest),
);
final response = await request;
Debug.print("UserRequest Response: ${response.body}");
return response;
}