mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:17:44 +00:00
LibWeb: Move Fetch infra into the Web::Fetch::Infrastructure namespace
The Fetch spec unfortunately will cause a name clash between the Request concept and the Request JS object - both cannot live in the Web::Fetch namespace, and WrapperGenerator generally assumes `Web::<Name>` for things living in the `<Name>/` subdirectory, so let's instead move infra code into its own namespace - it already sits in a (sub-)subdirectory anyway.
This commit is contained in:
parent
4b415a23c1
commit
2726fc9c73
20 changed files with 41 additions and 41 deletions
|
@ -6,7 +6,7 @@
|
|||
|
||||
#include <LibWeb/Fetch/Infrastructure/HTTP/Bodies.h>
|
||||
|
||||
namespace Web::Fetch {
|
||||
namespace Web::Fetch::Infrastructure {
|
||||
|
||||
Body::Body(ReadableStreamDummy stream)
|
||||
: m_stream(stream)
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include <AK/Variant.h>
|
||||
#include <LibWeb/FileAPI/Blob.h>
|
||||
|
||||
namespace Web::Fetch {
|
||||
namespace Web::Fetch::Infrastructure {
|
||||
|
||||
// https://fetch.spec.whatwg.org/#concept-body
|
||||
class Body final {
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include <LibWeb/Infra/ByteSequences.h>
|
||||
#include <LibWeb/MimeSniff/MimeType.h>
|
||||
|
||||
namespace Web::Fetch {
|
||||
namespace Web::Fetch::Infrastructure {
|
||||
|
||||
template<typename T>
|
||||
requires(IsSameIgnoringCV<T, u8>) struct CaseInsensitiveBytesTraits : public Traits<Span<T>> {
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include <AK/String.h>
|
||||
#include <AK/Vector.h>
|
||||
|
||||
namespace Web::Fetch {
|
||||
namespace Web::Fetch::Infrastructure {
|
||||
|
||||
// https://fetch.spec.whatwg.org/#concept-header
|
||||
// A header is a tuple that consists of a name (a header name) and value (a header value).
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include <LibWeb/Fetch/Infrastructure/HTTP/Methods.h>
|
||||
#include <LibWeb/Infra/ByteSequences.h>
|
||||
|
||||
namespace Web::Fetch {
|
||||
namespace Web::Fetch::Infrastructure {
|
||||
|
||||
// https://fetch.spec.whatwg.org/#concept-method
|
||||
bool is_method(ReadonlyBytes method)
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include <AK/Forward.h>
|
||||
|
||||
namespace Web::Fetch {
|
||||
namespace Web::Fetch::Infrastructure {
|
||||
|
||||
[[nodiscard]] bool is_method(ReadonlyBytes);
|
||||
[[nodiscard]] bool is_cors_safelisted_method(ReadonlyBytes);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include <AK/Array.h>
|
||||
#include <LibWeb/Fetch/Infrastructure/HTTP/Requests.h>
|
||||
|
||||
namespace Web::Fetch {
|
||||
namespace Web::Fetch::Infrastructure {
|
||||
|
||||
// https://fetch.spec.whatwg.org/#concept-request-url
|
||||
AK::URL const& Request::url() const
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include <LibWeb/HTML/PolicyContainers.h>
|
||||
#include <LibWeb/HTML/Scripting/Environments.h>
|
||||
|
||||
namespace Web::Fetch {
|
||||
namespace Web::Fetch::Infrastructure {
|
||||
|
||||
// https://fetch.spec.whatwg.org/#concept-request
|
||||
class Request final {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#include <LibWeb/Fetch/Infrastructure/HTTP/Responses.h>
|
||||
|
||||
namespace Web::Fetch {
|
||||
namespace Web::Fetch::Infrastructure {
|
||||
|
||||
// https://fetch.spec.whatwg.org/#ref-for-concept-network-error%E2%91%A3
|
||||
// A network error is a response whose status is always 0, status message is always
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include <LibWeb/Fetch/Infrastructure/HTTP/Headers.h>
|
||||
#include <LibWeb/Fetch/Infrastructure/HTTP/Statuses.h>
|
||||
|
||||
namespace Web::Fetch {
|
||||
namespace Web::Fetch::Infrastructure {
|
||||
|
||||
// https://fetch.spec.whatwg.org/#concept-response
|
||||
class Response {
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <AK/Array.h>
|
||||
#include <LibWeb/Fetch/Infrastructure/HTTP/Statuses.h>
|
||||
|
||||
namespace Web::Fetch {
|
||||
namespace Web::Fetch::Infrastructure {
|
||||
|
||||
// https://fetch.spec.whatwg.org/#null-body-status
|
||||
bool is_null_body_status(Status status)
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include <AK/Forward.h>
|
||||
|
||||
namespace Web::Fetch {
|
||||
namespace Web::Fetch::Infrastructure {
|
||||
|
||||
// https://fetch.spec.whatwg.org/#concept-status
|
||||
// A status is an integer in the range 0 to 999, inclusive.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue