mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:47:35 +00:00
LibWeb: Implement '5.4. Request class' from the Fetch API :^)
This commit is contained in:
parent
5ad6283331
commit
9fb672e981
13 changed files with 1146 additions and 3 deletions
28
Userland/Libraries/LibWeb/Fetch/Enums.h
Normal file
28
Userland/Libraries/LibWeb/Fetch/Enums.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Linus Groh <linusg@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AK/Forward.h>
|
||||
#include <LibWeb/Fetch/Infrastructure/HTTP/Requests.h>
|
||||
#include <LibWeb/Forward.h>
|
||||
|
||||
namespace Web::Fetch {
|
||||
|
||||
[[nodiscard]] Optional<ReferrerPolicy::ReferrerPolicy> from_bindings_enum(Bindings::ReferrerPolicy);
|
||||
[[nodiscard]] Infrastructure::Request::Mode from_bindings_enum(Bindings::RequestMode);
|
||||
[[nodiscard]] Infrastructure::Request::CredentialsMode from_bindings_enum(Bindings::RequestCredentials);
|
||||
[[nodiscard]] Infrastructure::Request::CacheMode from_bindings_enum(Bindings::RequestCache);
|
||||
[[nodiscard]] Infrastructure::Request::RedirectMode from_bindings_enum(Bindings::RequestRedirect);
|
||||
|
||||
[[nodiscard]] Bindings::ReferrerPolicy to_bindings_enum(Optional<ReferrerPolicy::ReferrerPolicy> const&);
|
||||
[[nodiscard]] Bindings::RequestDestination to_bindings_enum(Optional<Infrastructure::Request::Destination> const&);
|
||||
[[nodiscard]] Bindings::RequestMode to_bindings_enum(Infrastructure::Request::Mode);
|
||||
[[nodiscard]] Bindings::RequestCredentials to_bindings_enum(Infrastructure::Request::CredentialsMode);
|
||||
[[nodiscard]] Bindings::RequestCache to_bindings_enum(Infrastructure::Request::CacheMode);
|
||||
[[nodiscard]] Bindings::RequestRedirect to_bindings_enum(Infrastructure::Request::RedirectMode);
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue