Skip to content

Commit

Permalink
Merge pull request #13 from ratcashdev/master
Browse files Browse the repository at this point in the history
Bugfix: using getResponseHeaders() to send a response
  • Loading branch information
noboomu authored Apr 11, 2019
2 parents 14b3a54 + c362ca5 commit d0f2388
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ protected void addClassMethodHandlers(TypeSpec.Builder typeBuilder, Class<?> cla
methodBuilder.addStatement("exchange.getResponseHeaders().put($T.CONTENT_TYPE, $S)", Headers.class, producesContentType);

if (m.getReturnType().equals(String.class)) {
methodBuilder.addStatement("exchange.getResponseHeaders().send($L)", "response");
methodBuilder.addStatement("exchange.getResponseSender().send($L)", "response");
} else {
methodBuilder.addStatement("exchange.getResponseSender().send($L.toString())", "response");
}
Expand Down

0 comments on commit d0f2388

Please sign in to comment.