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
parent 5ad6283331
commit 9fb672e981
13 changed files with 1146 additions and 3 deletions

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));
}