code: public static String getRequestPayloadOutput(Request params, File file) {
          StringBuilder payload = new StringBuilder();
          String uuid = getUUID();
          payload.append(ONCLICK_TOGGLE).append(uuid).append("\")'>Toggle Payload</a> ");
          payload.append(SPAN_ID).append(uuid).append(DISPLAY_NONE);
          if (params != null && params.getJsonPayload() != null) {
              Gson gson = new GsonBuilder().setPrettyPrinting().create();
              payload.append(DIV);
              payload.append(formatHTML(gson.toJson(params.getJsonPayload())));
              payload.append(END_DIV);
          }
          if (params != null && params.getMultipartData() != null) {
              for (Map.Entry<String, Object> entry : params.getMultipartData().entrySet()) {
                  payload.append(DIV);
                  payload.append(entry.getKey());
                  payload.append(" : ");
                  payload.append(entry.getValue());
                  payload.append(END_DIV);
              }
          }
          if (file != null) {
              payload.append("<div> with file: <a href='file:///").append(file.getAbsoluteFile()).append("'>").append(file.getName()).append("</a></div>");
          }
          payload.append(END_SPAN);
          if (payload.toString().equals(ONCLICK_TOGGLE + uuid + "\")'>Toggle Payload</a> " + SPAN_ID + uuid + DISPLAY_NONE + END_SPAN)) {
              return "";
          } else {
              return payload.toString();
          }
      }
docs: Formats the request parameters to be 'prettily' printed out in HTML
  
  @param params - the parameters to be formatted. Either a JSON object, or a
  hashmap
  @return String: a 'prettily' formatted string that is HTML safe to output