Returns the first header string value for the given header name.

@param name header name (may be any case)
@return first header string value or {@code null} if not found
@since 1.13
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);
  }
387488
public final function getHeaderValue($name)
    {
        self::checkString($name);

        foreach ($this->_headers as $headerName => $headerValue) {

            if (strcasecmp($name, $headerName) === 0) {

                return $headerValue;
            }
        }

        return null;
    }
410334
@Override
    public Collection<String> getHeaders(String name) {
        return (headers != null ? headers.get(name) : null);
    }
107318
public function getHeader(string $name)
    {
        $name = strtolower($name);
        foreach ($this->headers as $current => $value) {
            if (strtolower($current) == $name) {
                return $value;
            }
        }

        return null;
    }
1277467
public int getIntHeader(String name)
  {
    if (_header != null)
    {
      int headerVal = _header.getIntHeader(name);
      if (headerVal != -1)
        return headerVal;
    }
    if (this.headerTable != null)
    {
      int i = 0;
      for (Object obj : headerTable[0])
      {
        String strVal = (String) obj;
        if (name.equals(strVal))
        {
          return Integer.valueOf((String) headerTable[1].get(i));
        }
        i++;
      }
    }
    return -1;
  }
898252
public String value(String name) {
        final HttpHeader header = getHeader(name);
        return header == null ? null : header.value();
    }
1279205
public String getFirst(String name, String defaultValue)
    {
        String value = getFirst(name);
        if (value == null) {
            value = defaultValue;
        }
        return value;
    }
835475
@Deprecated
    @Nullable
    public String getFirstHeader(String name) {
        requireNonNull(name);
        return getHeader(name);
    }
227428
public String getFieldValue(String name) {
        String field = (String)fields.get(name);
        if (field == null) {
            return null;
        }
        else {
        	return field;
        }
    }
495415
public boolean containsHeader(String name) {
        List<String> values = getHeaderMap().get(name);
        return (values != null && !values.isEmpty());
    }
471226
public String headerOut(String name)
  {
    ArrayList<String> keys = _headerKeysOut;

    int headerSize = keys.size();
    for (int i = 0; i < headerSize; i++) {
      String oldKey = keys.get(i);

      if (oldKey.equalsIgnoreCase(name)) {
        return (String) _headerValuesOut.get(i);
      }
    }

    /*
    if (name.equalsIgnoreCase("content-type")) {
      throw new UnsupportedOperationException();
      //return request().getContentType();
    }
    */

    if (name.equalsIgnoreCase("content-length")) {
      return _contentLengthOut >= 0 ? String.valueOf(_contentLengthOut) : null;
    }
    
    if (name.equalsIgnoreCase("content-type")) {
      return _contentTypeOut;
    }

    return null;
  }
913033
public String header(String k) {
    List<String> vs = headers.get(k);
    return (vs == null || vs.isEmpty()) ? null : vs.get(0);
  }
483254
@Override
    public List<String> headers(String name) {
        return request.headers().get(name);
    }
1214458
public String getString(T name) {
         return (attributes.containsKey(name)) ? attributes.get(name)[0] : null;
    }
395952
public CharSegment getHeaderBuffer(String name)
  {
    String value = header(name);

    if (value != null)
      return new CharBuffer(value);
    else
      return null;
  }
160170
public @Nullable Scriptable jsFunction_firstHeader(String name) {
		Header h = req.getFirstHeader(name);
		return h == null ? null : makeJsHeader(Context.getCurrentContext(), h);
	}
1230419
public String [] get(final String name) {
		if(has(name)) {
			List<String> values = headers.get(name).getValues();
			return values.toArray(new String [values.size()]);
		}
		else
			return null;
	}