We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Dropwizard doesn't seem to support HTTP trailer response headers, despite trailers being supported by jetty.
Is this something that can be added, considering it is supported by the underlying library and is part of the HTTP specifications?
The text was updated successfully, but these errors were encountered:
Hi @fmurray-r7. Since Jetty supports trailers, dropwizard supports them as well.
Trailers can be set through the servlet api. To do that, you'll inject the HttpServletResponse in your resource method and set the trailers:
HttpServletResponse
@GET public String helloWorld(@Context HttpServletResponse response) { response.setTrailerFields(() -> Map.of("Testkey", "Testvalue")); return "Hello World!"; }
To check, if the trailers are set correctly, you can use the Jetty client:
ContentResponse response = client .newRequest("http://localhost:8080") .method(HttpMethod.GET) .onResponseSuccess(response1 -> { if (response1 instanceof HttpResponse httpResponse) { System.out.println(httpResponse.getTrailers()); } }) .send();
Sorry, something went wrong.
Ah, my mistake, thank you for the clarification!
No branches or pull requests
Dropwizard doesn't seem to support HTTP trailer response headers, despite trailers being supported by jetty.
Is this something that can be added, considering it is supported by the underlying library and is part of the HTTP specifications?
The text was updated successfully, but these errors were encountered: