Jagger
 All Classes Namespaces Files Functions Variables Enumerator Groups Pages
CopyUtil.java
Go to the documentation of this file.
1 package com.griddynamics.jagger.invoker.scenario;
2 
3 import org.springframework.http.HttpHeaders;
4 
5 import java.util.LinkedList;
6 
7 public class CopyUtil {
8 
9  public static HttpHeaders copyOf(HttpHeaders headers) {
10  if (headers == null)
11  return null;
12  HttpHeaders headersCopy = new HttpHeaders();
13  headers.forEach((key, values) -> headersCopy.put(key, new LinkedList<>(values)));
14  return headersCopy;
15  }
16 }