
This implements the following operations from section 4 of the Fetch spec (https://fetch.spec.whatwg.org/#fetching): - Fetch - Main fetch - Fetch response handover - Scheme fetch - HTTP fetch - HTTP-redirect fetch - HTTP-network-or-cache fetch (without caching) It does *not* implement: - HTTP-network fetch - CORS-preflight fetch Instead, we let ResourceLoader handle the actual networking for now, which isn't ideal, but certainly enough to get enough functionality up and running for most websites to not complain.
22 lines
416 B
C++
22 lines
416 B
C++
/*
|
|
* Copyright (c) 2022, Linus Groh <linusg@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include <AK/NonnullRefPtr.h>
|
|
#include <LibWeb/Fetch/Fetching/RefCountedFlag.h>
|
|
|
|
namespace Web::Fetch::Fetching {
|
|
|
|
NonnullRefPtr<RefCountedFlag> RefCountedFlag::create(bool value)
|
|
{
|
|
return adopt_ref(*new RefCountedFlag(value));
|
|
}
|
|
|
|
RefCountedFlag::RefCountedFlag(bool value)
|
|
: m_value(value)
|
|
{
|
|
}
|
|
|
|
}
|