When choosing Mutiny in Quarkus REST

Scenario 1: Simple Synchronous Operation @GET @Produces(MediaType.TEXT_PLAIN) public String greeting() { return "Hello!"; } Use Case: You have a straightforward operation that completes quickly and doesn’t involve any asynchronous tasks (database queries, network calls, etc.). Why No Uni: In this case, using Uni would introduce unnecessary complexity. You can simply return the result directly as a String. Scenario 2: Asynchronous Operation with a Single Result @GET @Produces(MediaType.APPLICATION_JSON) public Uni<MyData> getData() { return Uni.
2 minutes to read

Enable Logging for Java 11 HttpClient

Introduction Java’s java.net.http.HttpClient (introduced in Java 11) provides a modern and standardized way to perform HTTP requests. Enabling detailed logging for this client offers invaluable insights when troubleshooting network issues, analyzing request/response behavior, and optimizing application performance. To enable the log, add this JVM option -Djdk.httpclient.HttpClient.log=errors,requests when staring your application. Code example I use this library as a client to call OpenAI API, the library uses httpclient for making http request.
One minute to read