1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:28:10 +00:00

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
parent 8dc6f7cd4f
commit a91c17c0eb
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();
}