1 package com.griddynamics.jagger.invoker.scenario;
3 import com.griddynamics.jagger.invoker.v2.JHttpEndpoint;
4 import org.springframework.http.HttpHeaders;
9 import static com.google.common.collect.Lists.newArrayList;
17 private String userName;
18 private String password;
20 private HttpHeaders globalHeaders;
36 this.globalEndpoint = globalEndpoint;
44 this.userName = userName;
45 this.password = password;
55 this.globalHeaders = globalHeaders;
66 this.globalHeaders.putAll(globalHeaders);
76 globalHeaders.put(key, newArrayList(value));
87 cookies.entrySet().forEach(entry -> this.globalHeaders.add(
"Cookie", entry.getKey() +
"=" + entry.getValue()));
96 this.globalHeaders.add(
"Cookie", name +
"=" + value);
100 private void initHeadersIfNull() {
101 if (this.globalHeaders == null)
102 this.globalHeaders =
new HttpHeaders();
106 return globalEndpoint;
118 return globalHeaders;
122 return globalHeaders.get(
"Cookie");