Class HttpResponse

  • All Implemented Interfaces:
    Response

    public class HttpResponse
    extends java.lang.Object
    implements Response
    • Method Detail

      • getRequest

        public Request getRequest()
        Specified by:
        getRequest in interface Response
        Returns:
        the request associated with this response
      • getVersion

        public org.eclipse.jetty.http.HttpVersion getVersion()
        Specified by:
        getVersion in interface Response
        Returns:
        the HTTP version of this response, such as "HTTP/1.1"
      • version

        public HttpResponse version​(org.eclipse.jetty.http.HttpVersion version)
      • getStatus

        public int getStatus()
        Specified by:
        getStatus in interface Response
        Returns:
        the HTTP status code of this response, such as 200 or 404
      • reason

        public HttpResponse reason​(java.lang.String reason)
      • getHeaders

        public org.eclipse.jetty.http.HttpFields getHeaders()
        Specified by:
        getHeaders in interface Response
        Returns:
        the headers of this response
      • getTrailers

        public org.eclipse.jetty.http.HttpFields getTrailers()
      • trailer

        public HttpResponse trailer​(org.eclipse.jetty.http.HttpField trailer)
      • abort

        public boolean abort​(java.lang.Throwable cause)
        Description copied from interface: Response
        Attempts to abort the receive of this response.
        Specified by:
        abort in interface Response
        Parameters:
        cause - the abort cause, must not be null
        Returns:
        whether the abort succeeded
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object