package com.github.bot.curiosone.api;

import spark.Request;
import spark.Response;

/**
 * Converts requests and responses into audit logs.
 * Provides a public static method to format a request-response interaction.
 */
public class AuditUtil {

  /**
  * Default Constructor.
  */
  private AuditUtil() {}

  /**
   * Formats an audit log record.
   * @param req The request object.
   * @param res The response object.
   * @return a String containing the audit log.
   */
  public static String format(Request req, Response res) {
    StringBuilder sb = new StringBuilder();
    sb.append(req.requestMethod());
    sb.append(" " + req.url());
    sb.append(" " + req.body());
    return sb.toString();
  }
}

@@ -94,17 +94,23 @@
 onverts 
-r
+Spark R
 equests 
@@ -113,17 +113,17 @@
 sts and 
-r
+R
 esponses
@@ -128,17 +128,17 @@
 es into 
-a
+A
 udit log
@@ -187,16 +187,22 @@
 ormat a 
+Spark 
 request-
@@ -330,20 +330,63 @@
   * 
-Formats an a
+Converts a Spark request-response interaction into an A
 udit
@@ -410,19 +410,33 @@
  @param 
+ 
 req
+%0A   *        
  The req
@@ -460,19 +460,33 @@
  @param 
+ 
 res
+%0A   *        
  The res
@@ -512,16 +512,17 @@
 @return 
+ 
 a String

improve AuditUtil javadoc layout