1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 09:04:59 +00:00

LibProtocol: Use URL class in RequestClient::start_request argument

This changes the RequestClient::start_request() method to take a URL
object instead of a URL string as argument. All callers of the method
already had a URL object anyway, and start_request() in turn parses the
URL string back into a URL object. This removes this unnecessary
conversion.
This commit is contained in:
Max Wipfli 2021-06-05 11:59:04 +02:00 committed by Andreas Kling
parent 5b5f7bc360
commit 30cdebfa9e
5 changed files with 7 additions and 7 deletions

View file

@ -36,7 +36,7 @@ DownloadWidget::DownloadWidget(const URL& url)
}
m_elapsed_timer.start();
m_download = Web::ResourceLoader::the().protocol_client().start_request("GET", url.to_string());
m_download = Web::ResourceLoader::the().protocol_client().start_request("GET", url);
VERIFY(m_download);
m_download->on_progress = [this](Optional<u32> total_size, u32 downloaded_size) {
did_progress(total_size.value(), downloaded_size);