public static String getHeader(HttpServletRequest request, String header) {

		// noting to search in or nothing to be found
		if (request == null || StringUtils.isNullOrEmptyTrimmed(header)) {
			return null;
		}

		return request.getHeader(header);
	}
public static String getHeader ( HttpServletRequest request , String header ) { if ( request == null || StringUtils . isNullOrEmptyTrimmed ( header ) ) { return null ; } return request . getHeader ( header ) ; }
Returns header from given request

@param request to search for header
@param header  name
@return header value or null if not found