<pre>
HTTP headers to use for all responses from these URLs.
</pre>

<code>map&lt;string, string&gt; http_headers = 3;</code>
162293
public java.lang.String getHttpHeadersOrThrow(
      java.lang.String key) {
    if (key == null) { throw new java.lang.NullPointerException(); }
    java.util.Map<java.lang.String, java.lang.String> map =
        internalGetHttpHeaders().getMap();
    if (!map.containsKey(key)) {
      throw new java.lang.IllegalArgumentException();
    }
    return map.get(key);
  }
672653
public Map<String, String> getHeadersToMap(Map<String, String> map) {
        if (map == null) map = new LinkedHashMap<>();
        final Map<String, String> map0 = map;
        header.forEach((k, v) -> map0.put(k, v));
        return map0;
    }
842513
public B addHttpHeaders(Headers<AsciiString, String, ?> httpHeaders) {
        requireNonNull(httpHeaders, "httpHeaders");
        this.httpHeaders.add(httpHeaders);
        return self();
    }
640354
private HashMap<String, String> createRegistrationHeaders() {
        HashMap<String, String> headers = new HashMap<>();
        addSessionIdHeader(headers);

        return headers;
    }
923530
public Headers getAllHeaders() {
        Headers requestHeaders = getHeaders();
        requestHeaders = hasPayload() ? requestHeaders.withContentType(getPayload().get().getMimeType()) : requestHeaders;
        //We don't want to add headers more than once.
        return requestHeaders;
    }
1227300
private static Map<String, String> getHeaderParams( final String header ) {
        if( header == null || header.length() == 0 )
            return Collections.emptyMap();

        final int headerLength = header.length();
        int start = header.indexOf(';') + 1;
        if( start == 0 || start == headerLength )
            return Collections.emptyMap();

        int end = header.indexOf(';', start);
        if( end == -1 )
            end = headerLength;

        Map<String, String> params = new LinkedHashMap<String, String>();
        while( start < end ) {
            int nameEnd = header.indexOf('=', start);
            if( nameEnd != -1 && nameEnd < end ) {
                String name = header.substring(start, nameEnd).trim();
                if( name.length() > 0 ) {
                    String value = header.substring(nameEnd + 1, end).trim();
                    int length = value.length();
                    if( length != 0 )
                        if( length > 2 && '"' == value.charAt(0) && '"' == value.charAt(length - 1) )
                            params.put(name, value.substring(1, length - 1));
                        else
                            params.put(name, value);
                }
            }

            start = end + 1;
            end = header.indexOf(';', start);
            if( end == -1 )
                end = headerLength;
        }

        return params;
    }
1004580
public static Map<String, List<String>> getResponseHeaders(String stringUrl,
      boolean followRedirects) throws IOException {
    URL url = new URL(stringUrl);
    HttpURLConnection conn = (HttpURLConnection) url.openConnection();
    conn.setInstanceFollowRedirects(followRedirects);
    
    InputStream is = conn.getInputStream();
    if ("gzip".equals(conn.getContentEncoding())) {
       is = new GZIPInputStream(is);
    }

    Map<String, List<String>> headers = new LinkedHashMap<String, List<String>>(conn.getHeaderFields());
    headers.put("X-Content", Arrays.asList(MyStreamUtils.readContent(is)));
    headers.put("X-URL", Arrays.asList(conn.getURL().toString()));
    headers.put("X-Status", Arrays.asList(String.valueOf(conn.getResponseCode())));
    
    return headers;
  }
755800
public void setHeaders(Map<String, String> map) {
        headers = new MetadataMap<String, String>();
        for (Map.Entry<String, String> entry : map.entrySet()) {
            String[] values = entry.getValue().split(",");
            for (String v : values) {
                if (v.length() != 0) {
                    headers.add(entry.getKey(), v);
                }
            }
        }
    }
382340
public static String get(String url, Map<String, String> headers) throws IOException {
        return HttpUtil.get(url, headers, "");
    }
1073473
public com.google.protobuf.ByteString
      getHttpHeaderBytes() {
    java.lang.Object ref = httpHeader_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      httpHeader_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }
225832
public Map<String, String> requestHeaders(){
        Map<String, String> headers = new HashMap<String, String>();
        Enumeration<String> names = request.getHeaderNames();
        while (names.hasMoreElements()) {
            String name = names.nextElement();
            headers.put(name, request.getHeader(name));
        }
        return headers;
    }
1273283
@NotNull
	public HttpResponse withHeader(@NotNull HttpHeader header, @NotNull String value) {
		addHeader(header, value);
		return this;
	}
436093
@Override
    public Map<String, String> getRequestHeaders() {
        Map<String, String> requestHeaders = super.getRequestHeaders();
        if (requestHeaders == null)
            requestHeaders = new HashMap<>();
        try {
            requestHeaders.put(Request.REQUEST_ID, getMasterRequestId());
            String httpMethod = getHttpMethod();
            if ("GET".equals(httpMethod))
                requestHeaders.put("Accept", "application/json");
            else
                requestHeaders.put("Content-Type", "application/json");
        }
        catch (ActivityException ex) {
            logexception(ex.getMessage(), ex);
        }
        return requestHeaders;
    }
1049261
public boolean containsHttpHeaders(
      java.lang.String key) {
    if (key == null) { throw new java.lang.NullPointerException(); }
    return internalGetHttpHeaders().getMap().containsKey(key);
  }
744912
public void doGet(String url, HttpResponse response, Map<String, Object> headers) {
        doGet(url, response, headers, true);
    }
605650
public Map<String, String> createHeadersFromString(String headersAndValues) {

    if (headersAndValues == null || headersAndValues.isEmpty()) return Collections.emptyMap();

    final StringTokenizer token = new StringTokenizer(headersAndValues, "@");

    final Map<String, String> theHeaders = new HashMap<String, String>(token.countTokens());

    while (token.hasMoreTokens()) {
      final String headerAndValue = token.nextToken();
      if (!headerAndValue.contains(":"))
        throw new IllegalArgumentException(
            "Request headers wrongly configured, missing separator :" + headersAndValues);

      final String header = headerAndValue.substring(0, headerAndValue.indexOf(":"));
      final String value =
          headerAndValue.substring(headerAndValue.indexOf(":") + 1, headerAndValue.length());
      theHeaders.put(header, value);
    }

    return theHeaders;

  }
1320279
public RequestTemplate headers(Map<String, Collection<String>> headers) {
    if (headers != null && !headers.isEmpty()) {
      headers.forEach(this::header);
    } else {
      this.headers.clear();
    }
    return this;
  }