Get the header with the given name.

The lookup is case insensitive.

@param name The name of the header.
@return The header value.
13685
public Optional<String> getHeader(String name) {
        PSequence<String> values = lowercaseHeaders.get(name.toLowerCase(Locale.ENGLISH));
        if (values == null || values.isEmpty()) {
            return Optional.empty();
        } else {
            return Optional.of(values.get(0));
        }
    }
913033
public String header(String k) {
    List<String> vs = headers.get(k);
    return (vs == null || vs.isEmpty()) ? null : vs.get(0);
  }
575665
@SuppressWarnings("unchecked")
	public static <T> T lookup(String name) {
		try {
			return (T) new InitialContext().lookup(name);
		} catch (NamingException e) {
			throw new IllegalStateException(e);
		}
	}
1204732
public List<String> getHeader(String name) {
        if (headers == null) {
            return null;
        }
        return headers.values(name);
    }
775733
public String getHeader(@NotNull final String name, String defaultValue) {
        if (headers().contains(name)) {
            return getHeader(name);
        } else {
            return defaultValue;
        }
    }
224104
public String[] values(String name) {
        final HttpHeader header = getHeader(name);
        return header == null ? null : header.values();
    }
1077137
public String header(String name) {
		final List<String> values = headerList(name);
		if(CollectionUtil.isEmpty(values)) {
			return null;
		}
		return values.get(0);
	}
78989
public String get(String name) {
    List<String> valuesList = values(name);
    String value = null;
    if (valuesList != null && valuesList.size() > 0) {
      value = valuesList.get(0);
    }
    return value;
  }
903925
public String getHeader(String name) {
        Vector<String> v = getHeaders(name);
        if (v == null) {
            return null;
        }

        return v.firstElement();
    }
1021440
public String getHeader(String name, String defaultValue) {
        return header.getValue(name, defaultValue);
    }
393122
@Override
    public boolean containsHeader(String name) {
        return (headers != null && headers.get(name) != null && !headers.get(name).isEmpty());
    }
859385
public String getFirst(String name)
    {
        HeaderName hn = getHeaderName(name);
        return getFirst(hn);
    }
278807
public String getHeader(String headerName) {
        List<String> headers = null;
        for (String h : headers().keySet()) {
            if (headerName.equalsIgnoreCase(h)) {
                headers = headers().get(h);
                break;
            }
        }
        if (headers == null || headers.isEmpty()) {
            return null;
        }
        return headers.get(0);
    }
410334
@Override
    public Collection<String> getHeaders(String name) {
        return (headers != null ? headers.get(name) : null);
    }
902225
@Override
	public String getHeaderValue(String headerName) {
		if (activeMethod == null) {
			return null;
		}
		
		Header header = activeMethod.getResponseHeader(headerName);
		
		if (header == null) {
			return null;
		}
		
		return header.getValue();
	}
166076
public String getFirstHeaderStringValue(String name) {
    Object value = get(name.toLowerCase(Locale.US));
    if (value == null) {
      return null;
    }
    Class<? extends Object> valueClass = value.getClass();
    if (value instanceof Iterable<?> || valueClass.isArray()) {
      for (Object repeatedValue : Types.iterableOf(value)) {
        return toStringValue(repeatedValue);
      }
    }
    return toStringValue(value);
  }
1167881
public T get(String name) {		
		String lcName = name.toLowerCase();
		for (T item : collection) {
			if (item.getName().toLowerCase().equals(lcName)) {
				return item;
			}
		}

		return null;
	}