1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:47:47 +00:00

LibWeb: Add getters and setters for Fetch::Header's members

This commit is contained in:
Linus Groh 2022-09-25 14:02:47 +01:00
parent dc6fb43d26
commit fd52119ca3

View file

@ -35,6 +35,14 @@ public:
virtual ~Headers() override;
[[nodiscard]] Infrastructure::HeaderList& header_list() { return m_header_list; }
[[nodiscard]] Infrastructure::HeaderList const& header_list() const { return m_header_list; }
void set_header_list(Infrastructure::HeaderList header_list) { m_header_list = move(header_list); }
[[nodiscard]] Guard guard() const { return m_guard; }
void set_guard(Guard guard) { m_guard = guard; }
// JS API functions
WebIDL::ExceptionOr<void> append(Infrastructure::Header);
WebIDL::ExceptionOr<void> append(String const& name, String const& value);
WebIDL::ExceptionOr<void> delete_(String const& name);