Interface StreamResponse.ResponseHeaders

Enclosing class:
StreamResponse
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface StreamResponse.ResponseHeaders
Abstraction for HTTP response headers.
  • Method Details

    • getFirstValue

      Optional<String> getFirstValue(String headerName)
      Gets the first value of the specified header.
      Parameters:
      headerName - the name of the header
      Returns:
      an Optional containing the first header value, or empty if not found
    • getFileName

      default Optional<String> getFileName()
      Gets the file name from the Content-Disposition header
      Returns:
      an Optional containing the file name if its present in the header, empty otherwise
    • getContentType

      default Optional<String> getContentType()
      Gets the Content-Type header value in lower-case.
      Returns:
      an Optional containing the Content-Type header value if its present in the header, empty otherwise