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