AK: Add a query string component to URL

It's missing query string parsing from new URLs, but you can set the
query string programmatically, and it will be part of the URL when
serialized through to_string().
This commit is contained in:
Andreas Kling 2019-11-25 21:20:03 +01:00
commit a91c17c0eb
Notes: sideshowbarker 2024-07-19 11:04:53 +09:00
2 changed files with 9 additions and 0 deletions

View file

@ -144,6 +144,10 @@ String URL::to_string() const
}
}
builder.append(m_path);
if (!m_query.is_empty()) {
builder.append('?');
builder.append(m_query);
}
return builder.to_string();
}