String userId = request.getParameter("userId");
String date = request.getParameter("date");
log.info("Get sleep by date :: userId = " + userId + ", date = " + date);
List<String> messages = new ArrayList<String>();
Sleep sleep = null;
try {
sleep = context.getApiClientService().getClient().getSleep(context.getOurUser(), new FitbitUser(userId), FitbitApiService.getValidLocalDateOrNull(date));
String message = "Sleep for userId = '" + userId + "' received.";
messages.add(message);
log.info(message);