Class ResponseUtil

java.lang.Object
com.patreonshout.utils.ResponseUtil

public class ResponseUtil
extends java.lang.Object
POJO containing functions to assist and generate endpoint JSON output
  • Constructor Summary

    Constructors
    Constructor Description
    ResponseUtil()  
  • Method Summary

    Modifier and Type Method Description
    static org.springframework.http.ResponseEntity<?> Generic​(org.springframework.http.HttpStatus httpStatus, java.lang.String message)
    Create a JSON response to output.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ResponseUtil

      public ResponseUtil()
  • Method Details

    • Generic

      public static org.springframework.http.ResponseEntity<?> Generic​(org.springframework.http.HttpStatus httpStatus, java.lang.String message)
      Create a JSON response to output.
      Parameters:
      httpStatus - HTTP code specifying the error
      message - Reasoning for the provided HTTP code
      Returns:
      ResponseEntity