Class HttpResponse

    • Method Detail

      • getUrl

        public URL getUrl()
        Description copied from interface: Response
        Get the URL used to retrieve this response.
        Specified by:
        getUrl in interface Response
        Returns:
        URL
      • getCode

        public int getCode()
        Description copied from interface: Response
        Get the response code.
        Specified by:
        getCode in interface Response
        Returns:
        protocol response code (int)
      • getHeader

        public String getHeader​(String name)
        Description copied from interface: Response
        Get the value of a named header.
        Specified by:
        getHeader in interface Response
        Parameters:
        name - key of the header you wish to retrieve
        Returns:
        header value
      • getContent

        public byte[] getContent()
        Description copied from interface: Response
        Get the full content of the response.
        Specified by:
        getContent in interface Response
        Returns:
        a byte array representing the response content