All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.basex.query.func.request.RequestHeaderNames Maven / Gradle / Ivy

The newest version!
package org.basex.query.func.request;

import java.util.*;

import org.basex.query.*;
import org.basex.query.func.*;
import org.basex.query.value.*;
import org.basex.query.value.seq.*;
import org.basex.util.list.*;

/**
 * Function implementation.
 *
 * @author BaseX Team 2005-24, BSD License
 * @author Christian Gruen
 */
public final class RequestHeaderNames extends ApiFunc {
  @Override
  public Value value(final QueryContext qc) throws QueryException {
    final TokenList tl = new TokenList();
    final Enumeration en = request(qc).getHeaderNames();
    while(en.hasMoreElements()) tl.add(en.nextElement());
    return StrSeq.get(tl);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy