Interface HttpResource

All Superinterfaces:
HttpBody
All Known Implementing Classes:
HttpResourceBean

public interface HttpResource extends HttpBody
An HttpBody that carries additional headers (such as Content-Type, Content-Disposition, or Content-Language) alongside the body.

Mirrors the semantics of HttpResource from juneau-rest-common-classic without the Apache HttpCore dependency. The default immutable implementation is HttpResourceBean.

See Also:
Since:
10.0.0
  • Method Details

    • getHeaders

      Returns the headers associated with this resource.

      The returned list may include body-specific headers (Content-Type, Content-Length) or arbitrary application headers (e.g. Cache-Control, Content-Disposition).

      Returns:
      The headers. Never null.