package com.bsmlab.dfx.agent.support;

import jakarta.servlet.http.HttpServletRequest;

import java.io.BufferedReader;
import java.io.IOException;
import java.util.stream.Collectors;

public class ServletUtils {
    private ServletUtils() {};

    public static String getBodyString(HttpServletRequest request) throws IOException {
        String bodyString = new BufferedReader(request.getReader()).lines().collect(Collectors.joining("\n"));
        return bodyString;
    }
}
