Class StatusLine

  • public class StatusLine
    extends Object
    A very simple representation of a HTTP status line.
    • Constructor Detail

      • StatusLine

        public StatusLine​(String version,
                          int resultCode,
                          String reason)
        Create a new StatusLine with the given response code and reason string.
        version - the version string (normally "HTTP/1.1" or "HTTP/1.0")
        resultCode - the HTTP response code (200, 401, etc.)
        reason - the reason phrase for the code
    • Method Detail

      • getVersion

        public String getVersion()
        Retrieves the version string.
        the version string
      • getResultCode

        public int getResultCode()
        Retrieves the HTTP response code.
        the code
      • getReason

        public String getReason()
        Retrieves the HTTP reason phrase.
        the reason