summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Loader
diff options
context:
space:
mode:
authorMax Wipfli <mail@maxwipfli.ch>2021-06-05 11:59:04 +0200
committerAndreas Kling <kling@serenityos.org>2021-06-06 16:00:11 +0200
commit30cdebfa9ef1c466484de997391b66f742f4b85b (patch)
tree86e52ebbd55135d4e27701b9a6bd341c36232c3e /Userland/Libraries/LibWeb/Loader
parent5b5f7bc360f3ec487ed6a21c350b7ca4ae165d17 (diff)
downloadserenity-30cdebfa9ef1c466484de997391b66f742f4b85b.zip
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.
Diffstat (limited to 'Userland/Libraries/LibWeb/Loader')
-rw-r--r--Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp b/Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp
index 50c82d7eaf..13e4ff92f6 100644
--- a/Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp
+++ b/Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp
@@ -156,7 +156,7 @@ void ResourceLoader::load(const LoadRequest& request, Function<void(ReadonlyByte
headers.set(it.key, it.value);
}
- auto protocol_request = protocol_client().start_request(request.method(), url.to_string(), headers, request.body());
+ auto protocol_request = protocol_client().start_request(request.method(), url, headers, request.body());
if (!protocol_request) {
if (error_callback)
error_callback("Failed to initiate load", {});