Retrieves a specific header value by its name

@param headerName The name of the header to retrieve
@return The value of the header or null if none found
330592
public String getHeader(HttpString headerName) {
        return (this.httpServerExchange.getRequestHeaders().get(headerName) == null) ? null : this.httpServerExchange.getRequestHeaders().get(headerName).element();
    }
991200
public String[] getHeaderValues(final String pHeaderName) {
        List<String> values = headers.get(pHeaderName);

        return values == null ? null : values.toArray(new String[values.size()]);
    }
903925
public String getHeader(String name) {
        Vector<String> v = getHeaders(name);
        if (v == null) {
            return null;
        }

        return v.firstElement();
    }
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));
        }
    }
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;
  }
718216
@Override
  public Object getHeader(BindingProvider soapClient, String headerName) {
    for (SOAPElement addedHeader : getContextHandlerFromClient(soapClient).getAddedHeaders()) {
      if (addedHeader.getNodeName().equals(headerName)) {
        return addedHeader;
      }
    }
    return null;
  }
662457
@Nonnull
  public ICommonsList <String> getHeaders (@Nullable final String sName)
  {
    return new CommonsArrayList <> (m_aHeaders.get (_unifyHeaderName (sName)));
  }
124875
public function getHeader($name)
    {
        assert(is_string($name));

        $name = strtolower($name);

        if (isset($this->_headers[$name])) {
            return $this->_headers[$name];
        }

        return null;
    }
853654
public final static String getHeader(String headerKey, String charset) {
		return ServletUtil.getHeader(getServletRequest(), headerKey, charset);
	}
1119531
public String getHeader( final String name ) {
        List<String> headerVals = getRequestInfo().getHeader(name);
        if( headerVals != null && !headerVals.isEmpty() ) {
            return headerVals.get(0);
        }
        return null;
    }
406082
private List<String> getHeaderValues(String name) {
        List<String> values = headers.get(name);
        if (values == null) {
            values = new ArrayList<String>();
            headers.put(name, values);
        }
        return values;
    }
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;
  }
827323
public int getIntHeader(String name)
    {
        HeaderField f = getHeaderField(name);
        if (f != null)
        {
            return f.getIntValue();
        }
        else
        {
            return -1;
        }
    }
297722
public ListIterator<String> getHeaders(String name) {
		String nameToSearch = getCorrectHeaderName(name);
		ArrayList<String> result = new ArrayList<String>();

		try {
			ListIterator<Header> list = this.message.getHeaders(nameToSearch);
			while (list != null && list.hasNext()) {
				Header h = list.next();
				result.add(((SIPHeader)h).getHeaderValue());
			}
		} catch (Exception e) {
			logger.fatal("Couldnt fetch headers, original name[" + name
					+ "], name searched[" + nameToSearch + "]", e);
			return result.listIterator();
		}
		return result.listIterator();
	}
107318
public function getHeader(string $name)
    {
        $name = strtolower($name);
        foreach ($this->headers as $current => $value) {
            if (strtolower($current) == $name) {
                return $value;
            }
        }

        return null;
    }
1106575
public String getHeader(String name) {

		String nameToSearch = getCorrectHeaderName(name);
		String value = null;
		if (this.message.getHeader(nameToSearch) != null) {
			value = ((SIPHeader) this.message.getHeader(nameToSearch))
					.getValue();
		}
		if(logger.isDebugEnabled()) {
			logger.debug("getHeader "+ name+ ", value="+ value	);
		}
		return value;
	}
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();
	}