src/main/java/com/jmsoftware/datastructuresandalgorithms/common/util/ResponseUtil.java
/**
     * Standardize http servlet response.
     *
     * @param response   the response
     * @param httpStatus the http status
     */
Standardize http servlet response.
@param response   the response
@param httpStatus the http status
Standardize http servlet response . @param response the response @param httpStatus the http status
private static void standardizeHttpServletResponse(final HttpServletResponse response,
                                                       final HttpStatus httpStatus) {
        response.setHeader("Access-Control-Allow-Origin", "*");
        response.setHeader("Access-Control-Allow-Methods", "*");
        response.setContentType("application/json;charset=UTF-8");
        response.setStatus(httpStatus.getCode());
    }
private static void standardizeHttpServletResponse ( final HttpServletResponse response , final HttpStatus httpStatus ) { response . setHeader ( "Access-Control-Allow-Origin" , "*" ) ; response . setHeader ( "Access-Control-Allow-Methods" , "*" ) ; response . setContentType ( "application/json;charset=UTF-8" ) ; response . setStatus ( httpStatus . getCode ( ) ) ; }
Standardize http servlet response.
Standardize http servlet response .