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

elemental2.dom.Headers Maven / Gradle / Ivy

There is a newer version: 1.0.139
Show newest version
package elemental2.dom;

import elemental2.core.JsIterable;
import elemental2.core.JsIterator;
import elemental2.core.JsIteratorIterable;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
import jsinterop.base.Js;
import jsinterop.base.JsPropertyMap;

@JsType(isNative = true, namespace = JsPackage.GLOBAL)
public class Headers implements JsIterable {
  @JsType(isNative = true, name = "?", namespace = JsPackage.GLOBAL)
  public interface ConstructorHeadersInitUnionType {
    @JsOverlay
    static Headers.ConstructorHeadersInitUnionType of(Object o) {
      return Js.cast(o);
    }

    @JsOverlay
    default Headers asHeaders() {
      return Js.cast(this);
    }

    @JsOverlay
    default JsPropertyMap asJsPropertyMap() {
      return Js.cast(this);
    }

    @JsOverlay
    default String[][] asStringArrayArray() {
      return Js.cast(this);
    }

    @JsOverlay
    default boolean isHeaders() {
      return (Object) this instanceof Headers;
    }

    @JsOverlay
    default boolean isStringArrayArray() {
      return (Object) this instanceof Object[];
    }
  }

  public Headers() {}

  public Headers(Headers.ConstructorHeadersInitUnionType headersInit) {}

  public Headers(Headers headersInit) {}

  public Headers(JsPropertyMap headersInit) {}

  public Headers(String[][] headersInit) {}

  public native void append(String name, String value);

  public native void delete(String name);

  public native JsIteratorIterable entries();

  public native String get(String name);

  public native String[] getAll(String name);

  public native boolean has(String name);

  public native JsIterator keys();

  public native void set(String name, String value);

  public native JsIterator values();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy