-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Dropwizard doesn't support HTTP trailers #8762
Comments
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 @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(); |
Ah, my mistake, thank you for the clarification! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: