Make it clearer that HttpResponse construction should generally not block
See original GitHub issueThis is just food for thought, can close if we’re happy already.
I find it’s too easy for users to shoot themselves in the foot since the difference in “semantic meaning” of an HttpResponse (something that streams) and AggregatedHttpResposne (something that’s collected) is very subtle.
Just changing all references of HttpResponse to AggregatedHttpResponse compiles, but changes the behavior completely from not-work to work. This is very subtle.
Should we reconsider providing the helpers that return a HttpResponse based on collected payloads? Remove from(CompletableStage<HttpResponse>) in favor of from(CompletableStage<AggregatedHttpResponse>? Change the naming? Or maybe just do nothing 😃
Issue Analytics
- State:
 - Created 4 years ago
 - Comments:10
 
Top Results From Across the Web
HTTP Messages - MDN Web Docs - Mozilla
HTTP messages are how data is exchanged between a server and a client. There are two types of messages: requests sent by the...
Read more >Java static code analysis: Constructors should not be used to ...
Constructors for String , BigInteger , BigDecimal and the objects used to wrap primitives should never be used. Doing so is less clear...
Read more >How to parse the response body in Java, when the HTTP ...
Try the following approach without needing a custom handler. The idea is to get the response as a string from the HttpStatusCodeException, and...
Read more >3 Configuring HTTP Secure Headers - Oracle Help Center
A browser detecting an XSS and blocking it does not mean that the application has an XSS vulnerability. In some cases, this header...
Read more >Exception Handling • Akka HTTP - Documentation
At the root of the route tree any still unhandled exception will be dealt ... could not be handled normally") complete(HttpResponse(InternalServerError, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I guess so 😃 But we might consider adding a version that logs warnings that users need to add the annotation before changing - if it were just a class load exception or something it’s still easy to debug if you missed the release notes, but if it’s deadlocks people could get very confused.
Thanks! I’ll close this one then.