mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-12 02:30:30 +09: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:
parent
5b5f7bc360
commit
30cdebfa9e
Notes:
sideshowbarker
2024-07-18 12:46:18 +09:00
Author: https://github.com/MaxWipfli
Commit: 30cdebfa9e
Pull-request: https://github.com/SerenityOS/serenity/pull/7842
5 changed files with 7 additions and 7 deletions
|
@ -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", {});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue