Class HttpResponse

    • Constructor Detail

      • HttpResponse

        public HttpResponse()
    • Method Detail

      • status

        public abstract StatusCode status()
        Returns the status-code of this response.
      • withStatus

        public abstract HttpResponse withStatus​(StatusCode statusCode)
        Returns a copy of this instance with a new status-code.
      • withStatus

        public abstract HttpResponse withStatus​(int statusCode)
        Returns a copy of this instance with a new status-code.
      • withEntity

        public abstract HttpResponse withEntity​(ResponseEntity entity)
        Returns a copy of this instance with a new entity.
      • encoding

        public abstract HttpEncoding encoding()
        Returns the content encoding as specified by the Content-Encoding header. If no Content-Encoding header is present the default value 'identity' is returned.
      • create

        public static HttpResponse create()
        Returns a default response to be changed using the `withX` methods.