Search in sources :

Example 1 with ReadOnlyParameters

use of io.helidon.common.http.ReadOnlyParameters in project helidon by oracle.

the class HelidonStructures method hasEntity.

static boolean hasEntity(WebClientResponse webClientResponse) {
    final ReadOnlyParameters headers = webClientResponse.content().readerContext().headers();
    final Optional<String> contentLenth = headers.first(Http.Header.CONTENT_LENGTH);
    final Optional<String> encoding = headers.first(Http.Header.TRANSFER_ENCODING);
    return ((contentLenth.isPresent() && !contentLenth.get().equals("0")) || (encoding.isPresent() && encoding.get().equals(HttpHeaderValues.CHUNKED.toString())));
}
Also used : ReadOnlyParameters(io.helidon.common.http.ReadOnlyParameters)

Aggregations

ReadOnlyParameters (io.helidon.common.http.ReadOnlyParameters)1