コード例 #1
0
 private static void copyHeadersAndContext(
     ActionRequest actionRequest, RestRequest restRequest, Set<String> headers) {
   for (String usefulHeader : headers) {
     String headerValue = restRequest.header(usefulHeader);
     if (headerValue != null) {
       actionRequest.putHeader(usefulHeader, headerValue);
     }
   }
   actionRequest.copyContextFrom(restRequest);
 }
コード例 #2
0
 private static void putHeaders(ActionRequest<?> request, Map<String, String> headers) {
   for (Map.Entry<String, String> header : headers.entrySet()) {
     request.putHeader(header.getKey(), header.getValue());
   }
 }