LibWeb: Implement '5.4. Request class' from the Fetch API :^)

This commit is contained in:
Linus Groh 2022-09-25 19:33:13 +01:00
commit 9fb672e981
Notes: sideshowbarker 2024-07-17 06:35:29 +09:00
13 changed files with 1146 additions and 3 deletions

View file

@ -31,6 +31,7 @@ class HeaderList final
, Vector<Header> {
public:
using Vector::begin;
using Vector::clear;
using Vector::end;
[[nodiscard]] bool contains(ReadonlyBytes) const;

View file

@ -36,7 +36,8 @@ void Request::set_url(AK::URL url)
// Sometimes setting the URL and URL list are done as two distinct steps in the spec,
// but since we know the URL is always the URL list's first item and doesn't change later
// on, we can combine them.
VERIFY(m_url_list.is_empty());
if (!m_url_list.is_empty())
m_url_list.clear();
m_url_list.append(move(url));
}