Created
February 8, 2018 22:55
-
-
Save ezarko/0163c23a1c3c1f709ccb0561895a6de8 to your computer and use it in GitHub Desktop.
Given an HttpServletRequest named request, creates a Map<String, String> of the headers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Map<String, String> headers = Collections.list(request.getHeaderNames()).stream().collect(Collectors.toMap(Function.identity(), n -> request.getHeader(n))); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment