类 HTTPResponse<T>


  • public class HTTPResponse<T>
    extends Object
    Http Response with body be transformed
    作者:
    Liu Dong
    • 方法详细资料

      • url

        public URL url()
        Get actual url (redirected)
      • statusCode

        public int statusCode()
        Return http response status code.
        返回:
        the status code
      • cookies

        public HTTPCookies cookies()
        Get all cookies returned by this response.
        返回:
        a immutable list of cookies
      • headers

        public HTTPHeaders headers()
        Get all response headers
      • body

        public T body()
        Return the response body.
        返回:
        The response body
      • transform

        public <R> HTTPResponse<R> transform​(Function<T,​R> transformer)
        Return a new Response, with body is the result apply transformer on the original response body.
        类型参数:
        R - the response body type
        参数:
        transformer - the function to convert response body