Interface HttpResponse

    • Method Detail

      • getCode

        int getCode()
        Obtains the code of this response message.
        Returns:
        the status code.
      • setCode

        void setCode​(int code)
        Updates status code of this response message.
        Parameters:
        code - the HTTP status code.
        See Also:
        HttpStatus
      • getReasonPhrase

        java.lang.String getReasonPhrase()
        Obtains the reason phrase of this response if available.
        Returns:
        the reason phrase.
      • setReasonPhrase

        void setReasonPhrase​(java.lang.String reason)
        Updates the status line of this response with a new reason phrase.
        Parameters:
        reason - the new reason phrase as a single-line string, or null to unset the reason phrase
      • getLocale

        java.util.Locale getLocale()
        Obtains the locale of this response. The locale is used to determine the reason phrase for the status code. It can be changed using setLocale.
        Returns:
        the locale of this response, never null
      • setLocale

        void setLocale​(java.util.Locale loc)
        Changes the locale of this response.
        Parameters:
        loc - the new locale