-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve documentation on how to write a response body in Jetty 12 #10293
Comments
This is the best I could come up with but I'm hoping there is a cleaner solution:
|
There are a few ways to write response body. Also of note, the See some example code snippets at Eg: you an use an OutputStream if you wanted, or a JDK Flow API, or a bunch of other options. |
@joakime Thank you. By the way, I think you have a bug at https://eclipse.dev/jetty/javadoc/jetty-12/org/eclipse/jetty/server/Handler.html The Javadoc contains this code snippet:
As far as I can tell, there is no such method. Also, https://eclipse.dev/jetty/javadoc/jetty-12/org/eclipse/jetty/server/Request.Handler.html#handle(org.eclipse.jetty.server.Request,org.eclipse.jetty.server.Response,org.eclipse.jetty.util.Callback) contains |
…in Jetty 12. Updated documentation about: * Content.Source * Content.Sink * Handler * Request/Response Updated few APIs to make easier to write applications. Signed-off-by: Simone Bordet <[email protected]>
…in Jetty 12. Updated documentation about: * Content.Source * Content.Sink * Handler * Request/Response Updated few APIs to make easier to write applications. Signed-off-by: Simone Bordet <[email protected]>
…in Jetty 12. Updated documentation about: * Content.Source * Content.Sink * Handler * Request/Response Updated few APIs to make easier to write applications. Signed-off-by: Simone Bordet <[email protected]>
Fixed by #10434. |
Jetty version
12.0.0
Java version
20
Question
What is the correct write to write a response body in Jetty 12 using the Response object? I saw
void write(boolean last, ByteBuffer byteBuffer, Callback callback)
but the Javadoc doesn't indicate what exactly it is writing (the body? the headers? something else?) and it's not clear how to best carry out this operation in a synchronous manner (for those of us who wants to stick with synchronous calls).The text was updated successfully, but these errors were encountered: