Class CaravanHttpResponse


  • @ProviderType
    public final class CaravanHttpResponse
    extends Object
    An immutable response to an http invocation which only returns string content.
    • Method Detail

      • status

        public int status()
        status code. ex 200 See rfc2616
        Returns:
        HTTP status code
      • reason

        public String reason()
        Returns:
        HTTP status reason
      • headers

        public com.google.common.collect.Multimap<String,​String> headers()
        Returns:
        HTTP headers
      • getCacheControl

        public Map<String,​String> getCacheControl()
        Collects all "Cache-Control" directives from the response headers into a single map. The keys in the map are the directive names (e.g. "max-age", "no-cache"), and everything after the "=" is taken as value. For directives that don't have a value "true" is used as a value instead.
        Returns:
        the map of Cache-Control directice
      • body

        public Body body()
        if present, the response had a body
        Returns:
        HTTP body