blob: e2427d0c0719165d9797a157c35606542835534c [file] [log] [blame]
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
typedef (Request or USVString) RequestInfo;
enum RequestDestination { "", "audio", "audioworklet", "document", "embed", "font", "image", "manifest", "object", "paintworklet", "report",
"script", "sharedworker", "style", "track", "video", "worker", "xslt" };
enum RequestMode { "navigate", "same-origin", "no-cors", "cors" };
enum RequestCredentials { "omit", "same-origin", "include" };
enum RequestRedirect { "follow", "error", "manual" };
enum RequestCache { "default", "no-store", "reload", "no-cache", "force-cache",
"only-if-cached" };
enum ReferrerPolicy {
Constructor(RequestInfo input, optional Dictionary requestInitDict),
] interface Request {
readonly attribute ByteString method;
readonly attribute USVString url;
[ImplementedAs=getHeaders, SameObject] readonly attribute Headers headers;
readonly attribute RequestDestination destination;
readonly attribute DOMString referrer;
[ImplementedAs=getReferrerPolicy] readonly attribute ReferrerPolicy referrerPolicy;
readonly attribute RequestMode mode;
readonly attribute RequestCredentials credentials;
[RuntimeEnabled=FetchRequestCache] readonly attribute RequestCache cache;
readonly attribute RequestRedirect redirect;
readonly attribute DOMString integrity;
[RuntimeEnabled=FetchRequestKeepalive] readonly attribute boolean keepalive;
[RaisesException, CallWith=ScriptState, DoNotTestNewObject, NewObject] Request clone();
Request implements Body;