Is there a way to read HTTP trailers with the Java 11 HttpClient?

Currently using the Java 11 HttpClient to make http requests and it appears there isn’t an obvious way to read response trailers. These responses are streamed back to the client – the Java 11 HttpClient is being used because it has better streaming support.

Any suggestions? Hacky answers accepted

  • 1

    I haven’t been able to find anything at all. I found some mentions of an “incubating feature” to support trailers, but apparently it never got added. My feeling would be to start looking at other libraries.

    – 

  • Did you try to read a trailer response with HttpClient?

    – 

  • 1

    Please provide enough code so others can better understand or reproduce the problem.

    – 
    Bot

  • 3

    The question looks like an exact duplicate of the following question: java – Does JDK11 HttpClient support trailer header? – Stack Overflow.

    – 




  • 1

    @BasilBourque That doesn’t mean it’s ok to ask the same question again. Instead, the OP should try to encourage answers to the existing question (I’ve just added another tag to that question, so it will be seen again in the recent questions list). In any case, if no-one can answer the existing question, then no-one can answer the new question either, unfortunately.

    – 




Leave a Comment