sendUserRequest function

Future<Response> sendUserRequest(
  1. UserRequest userRequest,
  2. String token
)

Implementation

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