Module ai.docling.serve.client
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.
Abstraction for HTTP response headers.
-
Method Summary
Modifier and TypeMethodDescriptionGets the Content-Type header value in lower-case.Gets the file name from the Content-Disposition headergetFirstValue(String headerName) Gets the first value of the specified header.
-
Method Details
-
getFirstValue
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
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
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
-