/* * Copyright (c) 2022, Linus Groh * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include namespace Web::Fetch { // https://fetch.spec.whatwg.org/#typedefdef-xmlhttprequestbodyinit using XMLHttpRequestBodyInit = Variant, JS::Handle, JS::Handle, String>; // https://fetch.spec.whatwg.org/#bodyinit using BodyInit = Variant, JS::Handle, JS::Handle, JS::Handle, String>; using BodyInitOrReadbleBytes = Variant, JS::Handle, JS::Handle, JS::Handle, String, ReadonlyBytes>; WebIDL::ExceptionOr extract_body(JS::Realm&, BodyInitOrReadbleBytes const&, bool keepalive = false); }