Module org.htmlunit

Class Fetch

java.lang.Object
org.htmlunit.javascript.host.fetch.Fetch

public final class Fetch extends Object
The implementation of fetch().

Supported are the request modes 'cors', 'same-origin' and 'no-cors' (opaque responses), the credentials, redirect and cache modes, the referrer options, subresource integrity and the size limit of keepalive requests.

Author:
Ronald Brill
See Also:
  • Method Details

    • fetch

      public static org.htmlunit.corejs.javascript.NativePromise fetch(HtmlUnitScriptable global, Object input, Object init)
      Starts a fetch.
      Parameters:
      global - the window or the worker global scope
      input - the input - a url or a Request
      init - the init dictionary or undefined
      Returns:
      the promise for the Response